Restructure contents of blimp/engine.
Restructure contents of blimp/engine folder. See crbug.com/581506
for more information on the eventual directory structure.
Modify paths and ifdef guards as needed.
Resolve various linter errors encountered along the way.
Update PRESUBMIT.py banned function exemption with the new path.
BUG=581506
[email protected],[email protected]
Review URL: https://codereview.chromium.org/1632803004
Cr-Commit-Position: refs/heads/master@{#372424}
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index 38dbcd7..6aef117 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -166,7 +166,7 @@
(
r"^base[\\\/]process[\\\/]process_linux\.cc$",
r"^base[\\\/]process[\\\/]process_metrics_linux\.cc$",
- r"^blimp[\\\/]engine[\\\/]browser[\\\/]blimp_browser_main_parts\.cc$",
+ r"^blimp[\\\/]engine[\\\/]app[\\\/]blimp_browser_main_parts\.cc$",
r"^chrome[\\\/]browser[\\\/]chromeos[\\\/]boot_times_recorder\.cc$",
r"^chrome[\\\/]browser[\\\/]chromeos[\\\/]"
"customization_document_browsertest\.cc$",
diff --git a/blimp/engine/BUILD.gn b/blimp/engine/BUILD.gn
index ccb43d2..7752536 100644
--- a/blimp/engine/BUILD.gn
+++ b/blimp/engine/BUILD.gn
@@ -44,11 +44,170 @@
output = "$root_out_dir/blimp_engine.pak"
}
+source_set("app") {
+ sources = [
+ "app/blimp_browser_main_parts.cc",
+ "app/blimp_browser_main_parts.h",
+ "app/blimp_content_browser_client.cc",
+ "app/blimp_content_browser_client.h",
+ "app/blimp_content_main_delegate.cc",
+ "app/blimp_content_main_delegate.h",
+ "app/blimp_content_renderer_client.cc",
+ "app/blimp_content_renderer_client.h",
+ "app/blimp_engine_config.cc",
+ "app/blimp_engine_config.h",
+ "app/blimp_network_delegate.cc",
+ "app/blimp_network_delegate.h",
+ "app/blimp_permission_manager.cc",
+ "app/blimp_permission_manager.h",
+ "app/blimp_url_request_context_getter.cc",
+ "app/blimp_url_request_context_getter.h",
+ "app/switches.cc",
+ "app/switches.h",
+ ]
+
+ deps = [
+ ":app_ui",
+ ":common",
+ ":session",
+ "//base",
+ "//blimp/common/proto",
+ "//components/web_cache/renderer",
+ "//content",
+ "//content/public/app:both",
+ "//content/public/browser",
+ "//content/public/common",
+ "//content/public/renderer",
+ "//content/public/utility",
+ ]
+}
+
+source_set("app_ui") {
+ sources = [
+ "app/ui/blimp_layout_manager.cc",
+ "app/ui/blimp_layout_manager.h",
+ "app/ui/blimp_screen.cc",
+ "app/ui/blimp_screen.h",
+ ]
+
+ if (!use_x11) {
+ sources += [
+ "app/ui/blimp_ui_context_factory.cc",
+ "app/ui/blimp_ui_context_factory.h",
+ "app/ui/blimp_window_tree_host.cc",
+ "app/ui/blimp_window_tree_host.h",
+ ]
+ }
+
+ deps = [
+ "//ui/aura",
+ "//ui/gfx",
+ "//ui/platform_window",
+ ]
+
+ if (!use_x11) {
+ deps += [
+ "//blimp/common:blimp_common",
+ "//cc",
+ "//cc/surfaces",
+ "//ui/compositor",
+ "//ui/events",
+ "//ui/platform_window",
+ "//ui/platform_window/stub/",
+ ]
+ }
+}
+
+source_set("common") {
+ sources = [
+ "common/blimp_browser_context.cc",
+ "common/blimp_browser_context.h",
+ "common/blimp_content_client.cc",
+ "common/blimp_content_client.h",
+ ]
+
+ deps = [
+ "//base",
+ "//components/version_info",
+ "//content/public/common",
+ "//ui/base",
+ ]
+}
+
+source_set("feature") {
+ sources = [
+ "feature/engine_render_widget_feature.cc",
+ "feature/engine_render_widget_feature.h",
+ ]
+
+ deps = [
+ "//base",
+ "//blimp/common/proto",
+ "//ui/base",
+ "//ui/base/ime",
+ "//ui/resources",
+ "//ui/wm",
+ ]
+}
+
+source_set("session") {
+ sources = [
+ "session/blimp_engine_session.cc",
+ "session/blimp_engine_session.h",
+ ]
+
+ deps = [
+ ":feature",
+ "//base",
+ "//blimp/common:blimp_common",
+ "//blimp/common/proto",
+ "//blimp/net:blimp_net",
+ "//content",
+ "//net",
+ ]
+}
+
+source_set("app_unit_tests") {
+ testonly = true
+
+ sources = [
+ "app/blimp_engine_config_unittest.cc",
+ ]
+
+ deps = [
+ ":app",
+ "//base",
+ "//base/test:run_all_unittests",
+ "//base/test:test_support",
+ "//testing/gmock",
+ "//testing/gtest",
+ ]
+}
+
+source_set("feature_unit_tests") {
+ testonly = true
+
+ sources = [
+ "feature/engine_render_widget_feature_unittest.cc",
+ ]
+
+ deps = [
+ ":feature",
+ "//base",
+ "//base/test:run_all_unittests",
+ "//base/test:test_support",
+ "//blimp/common/proto",
+ "//testing/gmock",
+ "//testing/gtest",
+ ]
+}
+
source_set("unit_tests") {
testonly = true
deps = [
- "//blimp/engine/browser:unit_tests",
+ ":app_unit_tests",
+ ":feature_unit_tests",
]
}
@@ -59,9 +218,10 @@
]
deps = [
+ ":app",
":pak",
- "//blimp/engine/app",
"//blimp/net:blimp_net",
+ "//content/public/app:both",
]
}
diff --git a/blimp/engine/app/BUILD.gn b/blimp/engine/app/BUILD.gn
deleted file mode 100644
index 48fb0257..0000000
--- a/blimp/engine/app/BUILD.gn
+++ /dev/null
@@ -1,19 +0,0 @@
-# Copyright 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-source_set("app") {
- sources = [
- "blimp_content_main_delegate.cc",
- "blimp_content_main_delegate.h",
- ]
-
- deps = [
- "//base",
- "//blimp/engine/browser",
- "//blimp/engine/common",
- "//blimp/engine/renderer",
- "//content/public/app:both",
- "//ui/base",
- ]
-}
diff --git a/blimp/engine/browser/blimp_browser_main_parts.cc b/blimp/engine/app/blimp_browser_main_parts.cc
similarity index 89%
rename from blimp/engine/browser/blimp_browser_main_parts.cc
rename to blimp/engine/app/blimp_browser_main_parts.cc
index c35d694..fde3458 100644
--- a/blimp/engine/browser/blimp_browser_main_parts.cc
+++ b/blimp/engine/app/blimp_browser_main_parts.cc
@@ -2,14 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "blimp/engine/browser/blimp_browser_main_parts.h"
+#include "blimp/engine/app/blimp_browser_main_parts.h"
#include "base/command_line.h"
#include "base/threading/thread_restrictions.h"
#include "blimp/common/proto/blimp_message.pb.h"
-#include "blimp/engine/browser/blimp_browser_context.h"
-#include "blimp/engine/browser/blimp_engine_config.h"
-#include "blimp/engine/browser/blimp_engine_session.h"
+#include "blimp/engine/app/blimp_engine_config.h"
+#include "blimp/engine/common/blimp_browser_context.h"
+#include "blimp/engine/session/blimp_engine_session.h"
#include "blimp/net/blimp_connection.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/common/main_function_params.h"
diff --git a/blimp/engine/browser/blimp_browser_main_parts.h b/blimp/engine/app/blimp_browser_main_parts.h
similarity index 87%
rename from blimp/engine/browser/blimp_browser_main_parts.h
rename to blimp/engine/app/blimp_browser_main_parts.h
index 803ac79..58a4336 100644
--- a/blimp/engine/browser/blimp_browser_main_parts.h
+++ b/blimp/engine/app/blimp_browser_main_parts.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef BLIMP_ENGINE_BROWSER_BLIMP_BROWSER_MAIN_PARTS_H_
-#define BLIMP_ENGINE_BROWSER_BLIMP_BROWSER_MAIN_PARTS_H_
+#ifndef BLIMP_ENGINE_APP_BLIMP_BROWSER_MAIN_PARTS_H_
+#define BLIMP_ENGINE_APP_BLIMP_BROWSER_MAIN_PARTS_H_
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
@@ -48,4 +48,4 @@
} // namespace engine
} // namespace blimp
-#endif // BLIMP_ENGINE_BROWSER_BLIMP_BROWSER_MAIN_PARTS_H_
+#endif // BLIMP_ENGINE_APP_BLIMP_BROWSER_MAIN_PARTS_H_
diff --git a/blimp/engine/browser/blimp_content_browser_client.cc b/blimp/engine/app/blimp_content_browser_client.cc
similarity index 87%
rename from blimp/engine/browser/blimp_content_browser_client.cc
rename to blimp/engine/app/blimp_content_browser_client.cc
index 4ccbf683..c10d04da 100644
--- a/blimp/engine/browser/blimp_content_browser_client.cc
+++ b/blimp/engine/app/blimp_content_browser_client.cc
@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "blimp/engine/browser/blimp_content_browser_client.h"
-#include "blimp/engine/browser/blimp_browser_context.h"
-#include "blimp/engine/browser/blimp_browser_main_parts.h"
+#include "blimp/engine/app/blimp_content_browser_client.h"
+#include "blimp/engine/app/blimp_browser_main_parts.h"
+#include "blimp/engine/common/blimp_browser_context.h"
namespace blimp {
namespace engine {
diff --git a/blimp/engine/browser/blimp_content_browser_client.h b/blimp/engine/app/blimp_content_browser_client.h
similarity index 86%
rename from blimp/engine/browser/blimp_content_browser_client.h
rename to blimp/engine/app/blimp_content_browser_client.h
index aee1c8c..346000a0 100644
--- a/blimp/engine/browser/blimp_content_browser_client.h
+++ b/blimp/engine/app/blimp_content_browser_client.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef BLIMP_ENGINE_BROWSER_BLIMP_CONTENT_BROWSER_CLIENT_H_
-#define BLIMP_ENGINE_BROWSER_BLIMP_CONTENT_BROWSER_CLIENT_H_
+#ifndef BLIMP_ENGINE_APP_BLIMP_CONTENT_BROWSER_CLIENT_H_
+#define BLIMP_ENGINE_APP_BLIMP_CONTENT_BROWSER_CLIENT_H_
#include "base/macros.h"
#include "content/public/browser/content_browser_client.h"
@@ -39,4 +39,4 @@
} // namespace engine
} // namespace blimp
-#endif // BLIMP_ENGINE_BROWSER_BLIMP_CONTENT_BROWSER_CLIENT_H_
+#endif // BLIMP_ENGINE_APP_BLIMP_CONTENT_BROWSER_CLIENT_H_
diff --git a/blimp/engine/app/blimp_content_main_delegate.cc b/blimp/engine/app/blimp_content_main_delegate.cc
index 44be171b..cd60b9fb 100644
--- a/blimp/engine/app/blimp_content_main_delegate.cc
+++ b/blimp/engine/app/blimp_content_main_delegate.cc
@@ -8,8 +8,8 @@
#include "base/files/file_path.h"
#include "base/logging.h"
#include "base/path_service.h"
-#include "blimp/engine/browser/blimp_content_browser_client.h"
-#include "blimp/engine/renderer/blimp_content_renderer_client.h"
+#include "blimp/engine/app/blimp_content_browser_client.h"
+#include "blimp/engine/app/blimp_content_renderer_client.h"
#include "ui/base/resource/resource_bundle.h"
namespace blimp {
diff --git a/blimp/engine/renderer/blimp_content_renderer_client.cc b/blimp/engine/app/blimp_content_renderer_client.cc
similarity index 91%
rename from blimp/engine/renderer/blimp_content_renderer_client.cc
rename to blimp/engine/app/blimp_content_renderer_client.cc
index 6b6e7b7a..c9e51ae 100644
--- a/blimp/engine/renderer/blimp_content_renderer_client.cc
+++ b/blimp/engine/app/blimp_content_renderer_client.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "blimp/engine/renderer/blimp_content_renderer_client.h"
+#include "blimp/engine/app/blimp_content_renderer_client.h"
#include "components/web_cache/renderer/web_cache_render_process_observer.h"
#include "content/public/renderer/render_thread.h"
diff --git a/blimp/engine/renderer/blimp_content_renderer_client.h b/blimp/engine/app/blimp_content_renderer_client.h
similarity index 82%
rename from blimp/engine/renderer/blimp_content_renderer_client.h
rename to blimp/engine/app/blimp_content_renderer_client.h
index 0006200..56e9cc0 100644
--- a/blimp/engine/renderer/blimp_content_renderer_client.h
+++ b/blimp/engine/app/blimp_content_renderer_client.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef BLIMP_ENGINE_RENDERER_BLIMP_CONTENT_RENDERER_CLIENT_H_
-#define BLIMP_ENGINE_RENDERER_BLIMP_CONTENT_RENDERER_CLIENT_H_
+#ifndef BLIMP_ENGINE_APP_BLIMP_CONTENT_RENDERER_CLIENT_H_
+#define BLIMP_ENGINE_APP_BLIMP_CONTENT_RENDERER_CLIENT_H_
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
@@ -34,4 +34,4 @@
} // namespace engine
} // namespace blimp
-#endif // BLIMP_ENGINE_RENDERER_BLIMP_CONTENT_RENDERER_CLIENT_H_
+#endif // BLIMP_ENGINE_APP_BLIMP_CONTENT_RENDERER_CLIENT_H_
diff --git a/blimp/engine/browser/blimp_engine_config.cc b/blimp/engine/app/blimp_engine_config.cc
similarity index 94%
rename from blimp/engine/browser/blimp_engine_config.cc
rename to blimp/engine/app/blimp_engine_config.cc
index da74bb7d..8b831586 100644
--- a/blimp/engine/browser/blimp_engine_config.cc
+++ b/blimp/engine/app/blimp_engine_config.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "blimp/engine/browser/blimp_engine_config.h"
+#include "blimp/engine/app/blimp_engine_config.h"
#include <string>
@@ -11,7 +11,7 @@
#include "base/files/file_util.h"
#include "base/memory/scoped_ptr.h"
#include "base/strings/string_util.h"
-#include "blimp/engine/browser/switches.h"
+#include "blimp/engine/app/switches.h"
namespace blimp {
namespace engine {
diff --git a/blimp/engine/browser/blimp_engine_config.h b/blimp/engine/app/blimp_engine_config.h
similarity index 91%
rename from blimp/engine/browser/blimp_engine_config.h
rename to blimp/engine/app/blimp_engine_config.h
index 0c46b9f..6f1583e 100644
--- a/blimp/engine/browser/blimp_engine_config.h
+++ b/blimp/engine/app/blimp_engine_config.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef BLIMP_ENGINE_BROWSER_BLIMP_ENGINE_CONFIG_H_
-#define BLIMP_ENGINE_BROWSER_BLIMP_ENGINE_CONFIG_H_
+#ifndef BLIMP_ENGINE_APP_BLIMP_ENGINE_CONFIG_H_
+#define BLIMP_ENGINE_APP_BLIMP_ENGINE_CONFIG_H_
#include <string>
@@ -55,4 +55,4 @@
} // namespace engine
} // namespace blimp
-#endif // BLIMP_ENGINE_BROWSER_BLIMP_ENGINE_CONFIG_H_
+#endif // BLIMP_ENGINE_APP_BLIMP_ENGINE_CONFIG_H_
diff --git a/blimp/engine/browser/blimp_engine_config_unittest.cc b/blimp/engine/app/blimp_engine_config_unittest.cc
similarity index 96%
rename from blimp/engine/browser/blimp_engine_config_unittest.cc
rename to blimp/engine/app/blimp_engine_config_unittest.cc
index 2268a567..4f8213b 100644
--- a/blimp/engine/browser/blimp_engine_config_unittest.cc
+++ b/blimp/engine/app/blimp_engine_config_unittest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "blimp/engine/browser/blimp_engine_config.h"
+#include "blimp/engine/app/blimp_engine_config.h"
#include <string>
#include <vector>
@@ -12,7 +12,7 @@
#include "base/files/scoped_temp_dir.h"
#include "base/memory/scoped_ptr.h"
#include "base/strings/stringprintf.h"
-#include "blimp/engine/browser/switches.h"
+#include "blimp/engine/app/switches.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace blimp {
diff --git a/blimp/engine/browser/blimp_network_delegate.cc b/blimp/engine/app/blimp_network_delegate.cc
similarity index 96%
rename from blimp/engine/browser/blimp_network_delegate.cc
rename to blimp/engine/app/blimp_network_delegate.cc
index c22da118..6689e599 100644
--- a/blimp/engine/browser/blimp_network_delegate.cc
+++ b/blimp/engine/app/blimp_network_delegate.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "blimp/engine/browser/blimp_network_delegate.h"
+#include "blimp/engine/app/blimp_network_delegate.h"
#include "net/base/net_errors.h"
#include "net/base/static_cookie_policy.h"
diff --git a/blimp/engine/browser/blimp_network_delegate.h b/blimp/engine/app/blimp_network_delegate.h
similarity index 85%
rename from blimp/engine/browser/blimp_network_delegate.h
rename to blimp/engine/app/blimp_network_delegate.h
index e8b0e2c..c7aef96 100644
--- a/blimp/engine/browser/blimp_network_delegate.h
+++ b/blimp/engine/app/blimp_network_delegate.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef BLIMP_ENGINE_BROWSER_BLIMP_NETWORK_DELEGATE_H_
-#define BLIMP_ENGINE_BROWSER_BLIMP_NETWORK_DELEGATE_H_
+#ifndef BLIMP_ENGINE_APP_BLIMP_NETWORK_DELEGATE_H_
+#define BLIMP_ENGINE_APP_BLIMP_NETWORK_DELEGATE_H_
#include <string>
@@ -35,4 +35,4 @@
} // namespace engine
} // namespace blimp
-#endif // BLIMP_ENGINE_BROWSER_BLIMP_NETWORK_DELEGATE_H_
+#endif // BLIMP_ENGINE_APP_BLIMP_NETWORK_DELEGATE_H_
diff --git a/blimp/engine/browser/blimp_permission_manager.cc b/blimp/engine/app/blimp_permission_manager.cc
similarity index 97%
rename from blimp/engine/browser/blimp_permission_manager.cc
rename to blimp/engine/app/blimp_permission_manager.cc
index 0e2aad65..11f1e23 100644
--- a/blimp/engine/browser/blimp_permission_manager.cc
+++ b/blimp/engine/app/blimp_permission_manager.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "blimp/engine/browser/blimp_permission_manager.h"
+#include "blimp/engine/app/blimp_permission_manager.h"
#include <vector>
diff --git a/blimp/engine/browser/blimp_permission_manager.h b/blimp/engine/app/blimp_permission_manager.h
similarity index 91%
rename from blimp/engine/browser/blimp_permission_manager.h
rename to blimp/engine/app/blimp_permission_manager.h
index 5ab2beb..e7f356d 100644
--- a/blimp/engine/browser/blimp_permission_manager.h
+++ b/blimp/engine/app/blimp_permission_manager.h
@@ -2,8 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef BLIMP_ENGINE_BROWSER_BLIMP_PERMISSION_MANAGER_H_
-#define BLIMP_ENGINE_BROWSER_BLIMP_PERMISSION_MANAGER_H_
+#ifndef BLIMP_ENGINE_APP_BLIMP_PERMISSION_MANAGER_H_
+#define BLIMP_ENGINE_APP_BLIMP_PERMISSION_MANAGER_H_
+
+#include <vector>
#include "base/callback_forward.h"
#include "base/macros.h"
@@ -56,4 +58,4 @@
} // namespace engine
} // namespace blimp
-#endif // BLIMP_ENGINE_BROWSER_BLIMP_PERMISSION_MANAGER_H_
+#endif // BLIMP_ENGINE_APP_BLIMP_PERMISSION_MANAGER_H_
diff --git a/blimp/engine/browser/blimp_url_request_context_getter.cc b/blimp/engine/app/blimp_url_request_context_getter.cc
similarity index 98%
rename from blimp/engine/browser/blimp_url_request_context_getter.cc
rename to blimp/engine/app/blimp_url_request_context_getter.cc
index 45cce32..09a96f9a 100644
--- a/blimp/engine/browser/blimp_url_request_context_getter.cc
+++ b/blimp/engine/app/blimp_url_request_context_getter.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "blimp/engine/browser/blimp_url_request_context_getter.h"
+#include "blimp/engine/app/blimp_url_request_context_getter.h"
#include <algorithm>
@@ -15,7 +15,7 @@
#include "base/strings/string_util.h"
#include "base/threading/sequenced_worker_pool.h"
#include "base/threading/worker_pool.h"
-#include "blimp/engine/browser/blimp_network_delegate.h"
+#include "blimp/engine/app/blimp_network_delegate.h"
#include "blimp/engine/common/blimp_content_client.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/cookie_store_factory.h"
diff --git a/blimp/engine/browser/blimp_url_request_context_getter.h b/blimp/engine/app/blimp_url_request_context_getter.h
similarity index 92%
rename from blimp/engine/browser/blimp_url_request_context_getter.h
rename to blimp/engine/app/blimp_url_request_context_getter.h
index d799037..e9806e6 100644
--- a/blimp/engine/browser/blimp_url_request_context_getter.h
+++ b/blimp/engine/app/blimp_url_request_context_getter.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef BLIMP_ENGINE_BROWSER_BLIMP_URL_REQUEST_CONTEXT_GETTER_H_
-#define BLIMP_ENGINE_BROWSER_BLIMP_URL_REQUEST_CONTEXT_GETTER_H_
+#ifndef BLIMP_ENGINE_APP_BLIMP_URL_REQUEST_CONTEXT_GETTER_H_
+#define BLIMP_ENGINE_APP_BLIMP_URL_REQUEST_CONTEXT_GETTER_H_
#include "base/files/file_path.h"
#include "base/macros.h"
@@ -76,4 +76,4 @@
} // namespace engine
} // namespace blimp
-#endif // BLIMP_ENGINE_BROWSER_BLIMP_URL_REQUEST_CONTEXT_GETTER_H_
+#endif // BLIMP_ENGINE_APP_BLIMP_URL_REQUEST_CONTEXT_GETTER_H_
diff --git a/blimp/engine/browser/switches.cc b/blimp/engine/app/switches.cc
similarity index 87%
rename from blimp/engine/browser/switches.cc
rename to blimp/engine/app/switches.cc
index 3aca1f7..dde944082 100644
--- a/blimp/engine/browser/switches.cc
+++ b/blimp/engine/app/switches.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "blimp/engine/browser/switches.h"
+#include "blimp/engine/app/switches.h"
namespace blimp {
namespace engine {
diff --git a/blimp/engine/browser/switches.h b/blimp/engine/app/switches.h
similarity index 74%
rename from blimp/engine/browser/switches.h
rename to blimp/engine/app/switches.h
index 07096ff5..d9d7afc 100644
--- a/blimp/engine/browser/switches.h
+++ b/blimp/engine/app/switches.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef BLIMP_ENGINE_BROWSER_SWITCHES_H_
-#define BLIMP_ENGINE_BROWSER_SWITCHES_H_
+#ifndef BLIMP_ENGINE_APP_SWITCHES_H_
+#define BLIMP_ENGINE_APP_SWITCHES_H_
namespace blimp {
namespace engine {
@@ -14,4 +14,4 @@
} // namespace engine
} // namespace blimp
-#endif // BLIMP_ENGINE_BROWSER_SWITCHES_H_
+#endif // BLIMP_ENGINE_APP_SWITCHES_H_
diff --git a/blimp/engine/ui/BUILD.gn b/blimp/engine/app/ui/BUILD.gn
similarity index 100%
rename from blimp/engine/ui/BUILD.gn
rename to blimp/engine/app/ui/BUILD.gn
diff --git a/blimp/engine/ui/blimp_layout_manager.cc b/blimp/engine/app/ui/blimp_layout_manager.cc
similarity index 95%
rename from blimp/engine/ui/blimp_layout_manager.cc
rename to blimp/engine/app/ui/blimp_layout_manager.cc
index 49f12ab..6ab016b 100644
--- a/blimp/engine/ui/blimp_layout_manager.cc
+++ b/blimp/engine/app/ui/blimp_layout_manager.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "blimp/engine/ui/blimp_layout_manager.h"
+#include "blimp/engine/app/ui/blimp_layout_manager.h"
#include "ui/aura/window.h"
diff --git a/blimp/engine/ui/blimp_layout_manager.h b/blimp/engine/app/ui/blimp_layout_manager.h
similarity index 88%
rename from blimp/engine/ui/blimp_layout_manager.h
rename to blimp/engine/app/ui/blimp_layout_manager.h
index 22ce1d8..b141fe7 100644
--- a/blimp/engine/ui/blimp_layout_manager.h
+++ b/blimp/engine/app/ui/blimp_layout_manager.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef BLIMP_ENGINE_UI_BLIMP_LAYOUT_MANAGER_H_
-#define BLIMP_ENGINE_UI_BLIMP_LAYOUT_MANAGER_H_
+#ifndef BLIMP_ENGINE_APP_UI_BLIMP_LAYOUT_MANAGER_H_
+#define BLIMP_ENGINE_APP_UI_BLIMP_LAYOUT_MANAGER_H_
#include "base/macros.h"
#include "ui/aura/layout_manager.h"
@@ -38,4 +38,4 @@
} // namespace engine
} // namespace blimp
-#endif // BLIMP_ENGINE_UI_BLIMP_LAYOUT_MANAGER_H_
+#endif // BLIMP_ENGINE_APP_UI_BLIMP_LAYOUT_MANAGER_H_
diff --git a/blimp/engine/ui/blimp_screen.cc b/blimp/engine/app/ui/blimp_screen.cc
similarity index 97%
rename from blimp/engine/ui/blimp_screen.cc
rename to blimp/engine/app/ui/blimp_screen.cc
index 1f9a32d..720d19e 100644
--- a/blimp/engine/ui/blimp_screen.cc
+++ b/blimp/engine/app/ui/blimp_screen.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "blimp/engine/ui/blimp_screen.h"
+#include "blimp/engine/app/ui/blimp_screen.h"
namespace blimp {
namespace engine {
diff --git a/blimp/engine/ui/blimp_screen.h b/blimp/engine/app/ui/blimp_screen.h
similarity index 91%
rename from blimp/engine/ui/blimp_screen.h
rename to blimp/engine/app/ui/blimp_screen.h
index 0e2e550..305e062e 100644
--- a/blimp/engine/ui/blimp_screen.h
+++ b/blimp/engine/app/ui/blimp_screen.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef BLIMP_ENGINE_UI_BLIMP_SCREEN_H_
-#define BLIMP_ENGINE_UI_BLIMP_SCREEN_H_
+#ifndef BLIMP_ENGINE_APP_UI_BLIMP_SCREEN_H_
+#define BLIMP_ENGINE_APP_UI_BLIMP_SCREEN_H_
#include <vector>
@@ -45,4 +45,4 @@
} // namespace engine
} // namespace blimp
-#endif // BLIMP_ENGINE_UI_BLIMP_SCREEN_H_
+#endif // BLIMP_ENGINE_APP_UI_BLIMP_SCREEN_H_
diff --git a/blimp/engine/ui/blimp_ui_context_factory.cc b/blimp/engine/app/ui/blimp_ui_context_factory.cc
similarity index 97%
rename from blimp/engine/ui/blimp_ui_context_factory.cc
rename to blimp/engine/app/ui/blimp_ui_context_factory.cc
index 0037469..d41150a2 100644
--- a/blimp/engine/ui/blimp_ui_context_factory.cc
+++ b/blimp/engine/app/ui/blimp_ui_context_factory.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "blimp/engine/ui/blimp_ui_context_factory.h"
+#include "blimp/engine/app/ui/blimp_ui_context_factory.h"
#include "cc/output/output_surface.h"
#include "cc/resources/shared_bitmap_manager.h"
diff --git a/blimp/engine/ui/blimp_ui_context_factory.h b/blimp/engine/app/ui/blimp_ui_context_factory.h
similarity index 90%
rename from blimp/engine/ui/blimp_ui_context_factory.h
rename to blimp/engine/app/ui/blimp_ui_context_factory.h
index acbc39f..4028b54 100644
--- a/blimp/engine/ui/blimp_ui_context_factory.h
+++ b/blimp/engine/app/ui/blimp_ui_context_factory.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef BLIMP_ENGINE_UI_BLIMP_UI_CONTEXT_FACTORY_H_
-#define BLIMP_ENGINE_UI_BLIMP_UI_CONTEXT_FACTORY_H_
+#ifndef BLIMP_ENGINE_APP_UI_BLIMP_UI_CONTEXT_FACTORY_H_
+#define BLIMP_ENGINE_APP_UI_BLIMP_UI_CONTEXT_FACTORY_H_
#include <stdint.h>
@@ -47,4 +47,4 @@
} // namespace engine
} // namespace blimp
-#endif // BLIMP_ENGINE_UI_BLIMP_UI_CONTEXT_FACTORY_H_
+#endif // BLIMP_ENGINE_APP_UI_BLIMP_UI_CONTEXT_FACTORY_H_
diff --git a/blimp/engine/ui/blimp_window_tree_host.cc b/blimp/engine/app/ui/blimp_window_tree_host.cc
similarity index 89%
rename from blimp/engine/ui/blimp_window_tree_host.cc
rename to blimp/engine/app/ui/blimp_window_tree_host.cc
index 61685b4..4693757 100644
--- a/blimp/engine/ui/blimp_window_tree_host.cc
+++ b/blimp/engine/app/ui/blimp_window_tree_host.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "blimp/engine/ui/blimp_window_tree_host.h"
+#include "blimp/engine/app/ui/blimp_window_tree_host.h"
#include "ui/platform_window/stub/stub_window.h"
diff --git a/blimp/engine/ui/blimp_window_tree_host.h b/blimp/engine/app/ui/blimp_window_tree_host.h
similarity index 82%
rename from blimp/engine/ui/blimp_window_tree_host.h
rename to blimp/engine/app/ui/blimp_window_tree_host.h
index 9aed6302..81791fba 100644
--- a/blimp/engine/ui/blimp_window_tree_host.h
+++ b/blimp/engine/app/ui/blimp_window_tree_host.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef BLIMP_ENGINE_UI_BLIMP_WINDOW_TREE_HOST_H_
-#define BLIMP_ENGINE_UI_BLIMP_WINDOW_TREE_HOST_H_
+#ifndef BLIMP_ENGINE_APP_UI_BLIMP_WINDOW_TREE_HOST_H_
+#define BLIMP_ENGINE_APP_UI_BLIMP_WINDOW_TREE_HOST_H_
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
@@ -28,4 +28,4 @@
} // namespace engine
} // namespace blimp
-#endif // BLIMP_ENGINE_UI_BLIMP_WINDOW_TREE_HOST_H_
+#endif // BLIMP_ENGINE_APP_UI_BLIMP_WINDOW_TREE_HOST_H_
diff --git a/blimp/engine/browser/BUILD.gn b/blimp/engine/browser/BUILD.gn
deleted file mode 100644
index 4fa99ba..0000000
--- a/blimp/engine/browser/BUILD.gn
+++ /dev/null
@@ -1,68 +0,0 @@
-# Copyright 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-source_set("browser") {
- sources = [
- "blimp_browser_context.cc",
- "blimp_browser_context.h",
- "blimp_browser_main_parts.cc",
- "blimp_browser_main_parts.h",
- "blimp_content_browser_client.cc",
- "blimp_content_browser_client.h",
- "blimp_engine_config.cc",
- "blimp_engine_config.h",
- "blimp_engine_session.cc",
- "blimp_engine_session.h",
- "blimp_network_delegate.cc",
- "blimp_network_delegate.h",
- "blimp_permission_manager.cc",
- "blimp_permission_manager.h",
- "blimp_url_request_context_getter.cc",
- "blimp_url_request_context_getter.h",
- "engine_render_widget_feature.cc",
- "engine_render_widget_feature.h",
- "switches.cc",
- "switches.h",
- ]
-
- deps = [
- "//base",
- "//blimp/common:blimp_common",
- "//blimp/common/proto",
- "//blimp/engine/ui",
- "//blimp/net:blimp_net",
- "//content",
- "//content/public/browser",
- "//content/public/common",
- "//content/public/utility",
- "//net",
- "//ui/base",
- "//ui/base/ime",
- "//ui/resources",
- "//ui/wm",
- ]
-}
-
-source_set("unit_tests") {
- testonly = true
-
- sources = [
- "blimp_engine_config_unittest.cc",
- "engine_render_widget_feature_unittest.cc",
- ]
-
- deps = [
- ":browser",
- "//base",
- "//base/test:run_all_unittests",
- "//base/test:test_support",
- "//blimp/common:blimp_common",
- "//blimp/common/proto",
- "//blimp/engine/common",
- "//blimp/net:blimp_net",
- "//blimp/net:test_support",
- "//testing/gmock",
- "//testing/gtest",
- ]
-}
diff --git a/blimp/engine/common/BUILD.gn b/blimp/engine/common/BUILD.gn
deleted file mode 100644
index 066d6ca5..0000000
--- a/blimp/engine/common/BUILD.gn
+++ /dev/null
@@ -1,17 +0,0 @@
-# Copyright 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-source_set("common") {
- sources = [
- "blimp_content_client.cc",
- "blimp_content_client.h",
- ]
-
- deps = [
- "//base",
- "//components/version_info",
- "//content/public/common",
- "//ui/base",
- ]
-}
diff --git a/blimp/engine/browser/blimp_browser_context.cc b/blimp/engine/common/blimp_browser_context.cc
similarity index 97%
rename from blimp/engine/browser/blimp_browser_context.cc
rename to blimp/engine/common/blimp_browser_context.cc
index 7b82f69..a316d9396 100644
--- a/blimp/engine/browser/blimp_browser_context.cc
+++ b/blimp/engine/common/blimp_browser_context.cc
@@ -2,14 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "blimp/engine/browser/blimp_browser_context.h"
+#include "blimp/engine/common/blimp_browser_context.h"
#include "base/bind.h"
#include "base/environment.h"
#include "base/files/file_util.h"
#include "base/nix/xdg_util.h"
#include "base/path_service.h"
-#include "blimp/engine/browser/blimp_permission_manager.h"
+#include "blimp/engine/app/blimp_permission_manager.h"
#include "content/public/browser/background_sync_controller.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/storage_partition.h"
diff --git a/blimp/engine/browser/blimp_browser_context.h b/blimp/engine/common/blimp_browser_context.h
similarity index 92%
rename from blimp/engine/browser/blimp_browser_context.h
rename to blimp/engine/common/blimp_browser_context.h
index 558e3eb..cdff712 100644
--- a/blimp/engine/browser/blimp_browser_context.h
+++ b/blimp/engine/common/blimp_browser_context.h
@@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef BLIMP_ENGINE_BROWSER_BLIMP_BROWSER_CONTEXT_H_
-#define BLIMP_ENGINE_BROWSER_BLIMP_BROWSER_CONTEXT_H_
+#ifndef BLIMP_ENGINE_COMMON_BLIMP_BROWSER_CONTEXT_H_
+#define BLIMP_ENGINE_COMMON_BLIMP_BROWSER_CONTEXT_H_
#include "base/files/file_path.h"
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
-#include "blimp/engine/browser/blimp_url_request_context_getter.h"
+#include "blimp/engine/app/blimp_url_request_context_getter.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/content_browser_client.h"
#include "content/public/browser/resource_context.h"
@@ -77,4 +77,4 @@
} // namespace engine
} // namespace blimp
-#endif // BLIMP_ENGINE_BROWSER_BLIMP_BROWSER_CONTEXT_H_
+#endif // BLIMP_ENGINE_COMMON_BLIMP_BROWSER_CONTEXT_H_
diff --git a/blimp/engine/browser/engine_render_widget_feature.cc b/blimp/engine/feature/engine_render_widget_feature.cc
similarity index 98%
rename from blimp/engine/browser/engine_render_widget_feature.cc
rename to blimp/engine/feature/engine_render_widget_feature.cc
index 35bead3cb..f990801fd 100644
--- a/blimp/engine/browser/engine_render_widget_feature.cc
+++ b/blimp/engine/feature/engine_render_widget_feature.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "blimp/engine/browser/engine_render_widget_feature.h"
+#include "blimp/engine/feature/engine_render_widget_feature.h"
#include "base/numerics/safe_conversions.h"
#include "blimp/common/create_blimp_message.h"
diff --git a/blimp/engine/browser/engine_render_widget_feature.h b/blimp/engine/feature/engine_render_widget_feature.h
similarity index 94%
rename from blimp/engine/browser/engine_render_widget_feature.h
rename to blimp/engine/feature/engine_render_widget_feature.h
index b3504f47..ac21d92b 100644
--- a/blimp/engine/browser/engine_render_widget_feature.h
+++ b/blimp/engine/feature/engine_render_widget_feature.h
@@ -2,11 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef BLIMP_ENGINE_BROWSER_ENGINE_RENDER_WIDGET_FEATURE_H_
-#define BLIMP_ENGINE_BROWSER_ENGINE_RENDER_WIDGET_FEATURE_H_
+#ifndef BLIMP_ENGINE_FEATURE_ENGINE_RENDER_WIDGET_FEATURE_H_
+#define BLIMP_ENGINE_FEATURE_ENGINE_RENDER_WIDGET_FEATURE_H_
#include <stdint.h>
+#include <map>
#include <vector>
#include "base/containers/small_map.h"
@@ -99,4 +100,4 @@
} // namespace blimp
-#endif // BLIMP_ENGINE_BROWSER_ENGINE_RENDER_WIDGET_FEATURE_H_
+#endif // BLIMP_ENGINE_FEATURE_ENGINE_RENDER_WIDGET_FEATURE_H_
diff --git a/blimp/engine/browser/engine_render_widget_feature_unittest.cc b/blimp/engine/feature/engine_render_widget_feature_unittest.cc
similarity index 98%
rename from blimp/engine/browser/engine_render_widget_feature_unittest.cc
rename to blimp/engine/feature/engine_render_widget_feature_unittest.cc
index 6433d8a..0cc9f3e2 100644
--- a/blimp/engine/browser/engine_render_widget_feature_unittest.cc
+++ b/blimp/engine/feature/engine_render_widget_feature_unittest.cc
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "blimp/engine/browser/engine_render_widget_feature.h"
-
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/numerics/safe_conversions.h"
@@ -11,6 +9,7 @@
#include "blimp/common/proto/blimp_message.pb.h"
#include "blimp/common/proto/compositor.pb.h"
#include "blimp/common/proto/render_widget.pb.h"
+#include "blimp/engine/feature/engine_render_widget_feature.h"
#include "blimp/net/input_message_generator.h"
#include "blimp/net/test_common.h"
#include "net/base/net_errors.h"
diff --git a/blimp/engine/browser/blimp_engine_session.cc b/blimp/engine/session/blimp_engine_session.cc
similarity index 98%
rename from blimp/engine/browser/blimp_engine_session.cc
rename to blimp/engine/session/blimp_engine_session.cc
index 97af6a1..c320501 100644
--- a/blimp/engine/browser/blimp_engine_session.cc
+++ b/blimp/engine/session/blimp_engine_session.cc
@@ -2,15 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "blimp/engine/browser/blimp_engine_session.h"
+#include "blimp/engine/session/blimp_engine_session.h"
#include "base/strings/utf_string_conversions.h"
#include "blimp/common/create_blimp_message.h"
#include "blimp/common/proto/tab_control.pb.h"
-#include "blimp/engine/browser/blimp_browser_context.h"
-#include "blimp/engine/ui/blimp_layout_manager.h"
-#include "blimp/engine/ui/blimp_screen.h"
-#include "blimp/engine/ui/blimp_ui_context_factory.h"
+#include "blimp/engine/app/ui/blimp_layout_manager.h"
+#include "blimp/engine/app/ui/blimp_screen.h"
+#include "blimp/engine/app/ui/blimp_ui_context_factory.h"
+#include "blimp/engine/common/blimp_browser_context.h"
#include "blimp/net/blimp_connection.h"
#include "blimp/net/blimp_message_multiplexer.h"
#include "blimp/net/blimp_message_thread_pipe.h"
@@ -38,7 +38,7 @@
#include "ui/wm/core/focus_controller.h"
#if !defined(USE_X11)
-#include "blimp/engine/ui/blimp_window_tree_host.h"
+#include "blimp/engine/app/ui/blimp_window_tree_host.h"
#endif
namespace blimp {
diff --git a/blimp/engine/browser/blimp_engine_session.h b/blimp/engine/session/blimp_engine_session.h
similarity index 96%
rename from blimp/engine/browser/blimp_engine_session.h
rename to blimp/engine/session/blimp_engine_session.h
index 30fa9a1..0edf808 100644
--- a/blimp/engine/browser/blimp_engine_session.h
+++ b/blimp/engine/session/blimp_engine_session.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef BLIMP_ENGINE_BROWSER_BLIMP_ENGINE_SESSION_H_
-#define BLIMP_ENGINE_BROWSER_BLIMP_ENGINE_SESSION_H_
+#ifndef BLIMP_ENGINE_SESSION_BLIMP_ENGINE_SESSION_H_
+#define BLIMP_ENGINE_SESSION_BLIMP_ENGINE_SESSION_H_
#include <stdint.h>
@@ -12,7 +12,7 @@
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "blimp/common/proto/blimp_message.pb.h"
-#include "blimp/engine/browser/engine_render_widget_feature.h"
+#include "blimp/engine/feature/engine_render_widget_feature.h"
#include "blimp/net/blimp_message_processor.h"
#include "blimp/net/connection_error_observer.h"
#include "content/public/browser/invalidate_type.h"
@@ -184,4 +184,4 @@
} // namespace engine
} // namespace blimp
-#endif // BLIMP_ENGINE_BROWSER_BLIMP_ENGINE_SESSION_H_
+#endif // BLIMP_ENGINE_SESSION_BLIMP_ENGINE_SESSION_H_