summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjam <jam@chromium.org>2015-11-06 09:16:29 -0800
committerCommit bot <commit-bot@chromium.org>2015-11-06 17:18:01 +0000
commit08c85fbce2720dfc1717c1f7d48aacad00c9c3c7 (patch)
tree7ba30fb933ea629d5c4f47bc21847ecdaa268e63
parent35b1c5a2321733b7b08e269d9eadcd3e67012aea (diff)
downloadchromium_src-08c85fbce2720dfc1717c1f7d48aacad00c9c3c7.zip
chromium_src-08c85fbce2720dfc1717c1f7d48aacad00c9c3c7.tar.gz
chromium_src-08c85fbce2720dfc1717c1f7d48aacad00c9c3c7.tar.bz2
Get Mandoline working in component build.
Since state is now shared between apps and the shell, there could be bugs that don't exist in static builds. Running in multi-process (default for Mandoline now) makes this less of an issue, since no apps will share state. There's very little code that runs in the shell in a child process. --single-process works for now, but that could have more issues down the line. For now, this is really a developer productivity feature, just like component build in Chrome. BUG=550498 Review URL: https://codereview.chromium.org/1410693004 Cr-Commit-Position: refs/heads/master@{#358343}
-rw-r--r--components/devtools_service/BUILD.gn4
-rw-r--r--components/filesystem/BUILD.gn4
-rw-r--r--components/font_service/public/cpp/BUILD.gn2
-rw-r--r--components/html_viewer/BUILD.gn6
-rw-r--r--components/html_viewer/global_state.cc28
-rw-r--r--components/html_viewer/web_layer_tree_view_impl.cc1
-rw-r--r--components/mus/BUILD.gn7
-rw-r--r--components/mus/example/window_type_launcher/BUILD.gn3
-rw-r--r--components/mus/gles2/BUILD.gn9
-rw-r--r--components/mus/public/cpp/BUILD.gn12
-rw-r--r--components/mus/public/cpp/context_provider.h2
-rw-r--r--components/mus/public/cpp/tests/BUILD.gn2
-rw-r--r--components/pdf_viewer/BUILD.gn3
-rw-r--r--components/resource_provider/BUILD.gn4
-rw-r--r--components/resource_provider/file_utils.cc23
-rw-r--r--components/resource_provider/file_utils.h4
-rw-r--r--components/resource_provider/file_utils_unittest.cc8
-rw-r--r--components/resource_provider/public/cpp/BUILD.gn1
-rw-r--r--components/resource_provider/resource_provider_app.cc4
-rw-r--r--components/resource_provider/resource_provider_impl.cc2
-rw-r--r--gpu/command_buffer/common/capabilities.h2
-rw-r--r--mandoline/BUILD.gn18
-rw-r--r--media/cdm/default_cdm_factory.h3
-rw-r--r--media/mojo/services/BUILD.gn78
-rw-r--r--media/mojo/services/mojo_renderer_factory.h2
-rw-r--r--media/test/BUILD.gn68
-rw-r--r--mojo/BUILD.gn24
-rw-r--r--mojo/common/data_pipe_drainer.h3
-rw-r--r--mojo/common/user_agent.h2
-rw-r--r--mojo/converters/surfaces/surfaces_type_converters.h2
-rw-r--r--mojo/gles2/BUILD.gn16
-rw-r--r--mojo/gles2/gles2_impl.cc3
-rw-r--r--mojo/platform_handle/BUILD.gn72
-rw-r--r--mojo/platform_handle/platform_handle_exports.h6
-rw-r--r--mojo/platform_handle/platform_handle_functions.cc (renamed from mojo/runner/platform_handle_impl.cc)3
-rw-r--r--mojo/public/mojo_application.gni7
-rw-r--r--mojo/runner/BUILD.gn21
-rw-r--r--mojo/runner/child/BUILD.gn5
-rw-r--r--mojo/runner/native_application_support.cc4
-rw-r--r--mojo/services/BUILD.gn12
-rw-r--r--third_party/mojo/src/mojo/edk/embedder/BUILD.gn14
-rw-r--r--third_party/mojo/src/mojo/public/c/gles2/BUILD.gn9
-rw-r--r--third_party/mojo/src/mojo/public/c/system/BUILD.gn13
-rw-r--r--third_party/mojo/src/mojo/public/gles2/BUILD.gn45
-rw-r--r--third_party/mojo/src/mojo/public/platform/native/BUILD.gn2
-rw-r--r--ui/platform_window/android/platform_ime_controller_android.h4
-rw-r--r--ui/platform_window/stub/stub_window.h3
-rw-r--r--ui/views/mus/BUILD.gn1
48 files changed, 327 insertions, 244 deletions
diff --git a/components/devtools_service/BUILD.gn b/components/devtools_service/BUILD.gn
index 26ca66e..67eccf5 100644
--- a/components/devtools_service/BUILD.gn
+++ b/components/devtools_service/BUILD.gn
@@ -4,10 +4,6 @@
import("//mojo/public/mojo_application.gni")
-# We don't support building mojo apps in the component build.
-# Currently this app is used by Mandoline only.
-assert(!is_component_build)
-
source_set("lib") {
sources = [
"devtools_agent_host.cc",
diff --git a/components/filesystem/BUILD.gn b/components/filesystem/BUILD.gn
index 028f02f..3159f2f 100644
--- a/components/filesystem/BUILD.gn
+++ b/components/filesystem/BUILD.gn
@@ -40,7 +40,7 @@ mojo_native_application("filesystem") {
"//mojo/application/public/cpp",
"//mojo/common",
"//mojo/environment:chromium",
- "//mojo/platform_handle",
+ "//mojo/platform_handle:for_shared_library",
"//third_party/mojo/src/mojo/public/cpp/bindings",
"//third_party/mojo/src/mojo/public/cpp/system",
]
@@ -62,7 +62,7 @@ mojo_native_application("apptests") {
"//base",
"//components/filesystem/public/interfaces",
"//mojo/application/public/cpp:test_support",
- "//mojo/platform_handle",
+ "//mojo/platform_handle:for_shared_library",
"//third_party/mojo/src/mojo/public/cpp/bindings",
]
diff --git a/components/font_service/public/cpp/BUILD.gn b/components/font_service/public/cpp/BUILD.gn
index 3145809..52359b7 100644
--- a/components/font_service/public/cpp/BUILD.gn
+++ b/components/font_service/public/cpp/BUILD.gn
@@ -19,7 +19,7 @@ source_set("cpp") {
"//mojo/application/public/interfaces",
"//mojo/common",
"//mojo/message_pump",
- "//mojo/platform_handle:defs",
+ "//mojo/platform_handle",
"//skia",
"//third_party/mojo/src/mojo/public/cpp/bindings",
"//third_party/mojo/src/mojo/public/cpp/system",
diff --git a/components/html_viewer/BUILD.gn b/components/html_viewer/BUILD.gn
index b1ed623..4fc54ed 100644
--- a/components/html_viewer/BUILD.gn
+++ b/components/html_viewer/BUILD.gn
@@ -39,10 +39,12 @@ repack("pak") {
"$root_gen_dir/blink/public/resources/blink_image_resources_100_percent.pak",
"$root_gen_dir/blink/public/resources/blink_resources.pak",
"$root_gen_dir/components/html_viewer/html_viewer_resources.pak",
- "$root_gen_dir/ui/resources/ui_resources_100_percent.pak",
"$root_gen_dir/ui/strings/app_locale_settings_en-US.pak",
"$root_gen_dir/ui/strings/ui_strings_en-US.pak",
]
+ if (!is_component_build) {
+ sources += [ "$root_gen_dir/ui/resources/ui_resources_100_percent.pak" ]
+ }
output = "$root_out_dir/html_viewer.pak"
deps = [
":copy_html_viewer_resources",
@@ -171,6 +173,7 @@ source_set("lib") {
"//media",
"//media/blink",
"//media/mojo",
+ "//media:shared_memory_support",
"//mojo/application/public/cpp",
"//mojo/application/public/interfaces",
"//mojo/common",
@@ -238,7 +241,6 @@ mojo_native_application("html_viewer") {
":pak",
"//base",
"//mojo/application/public/cpp:sources",
- "//third_party/mojo/src/mojo/public/c/system:for_shared_library",
]
resources = [ "$root_out_dir/html_viewer.pak" ]
diff --git a/components/html_viewer/global_state.cc b/components/html_viewer/global_state.cc
index 37e5c49..a0bb8be 100644
--- a/components/html_viewer/global_state.cc
+++ b/components/html_viewer/global_state.cc
@@ -143,28 +143,34 @@ void GlobalState::InitIfNecessary(const gfx::Size& screen_size_in_pixels,
0u);
#endif
blink::initialize(blink_platform_.get());
- base::i18n::InitializeICUWithFileDescriptor(
- resource_loader_.GetICUFile().TakePlatformFile(),
- base::MemoryMappedFile::Region::kWholeFile);
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
+ base::File pak_file = resource_loader_.ReleaseFile(kResourceResourcesPak);
- ui::RegisterPathProvider();
+ bool initialize_icu_and_ui = true;
+#if defined(COMPONENT_BUILD)
+ if (command_line->HasSwitch("single-process"))
+ initialize_icu_and_ui = false;
+#endif
+ if (initialize_icu_and_ui) {
+ base::i18n::InitializeICUWithFileDescriptor(
+ resource_loader_.GetICUFile().TakePlatformFile(),
+ base::MemoryMappedFile::Region::kWholeFile);
+ ui::RegisterPathProvider();
+ base::File pak_file_2 = pak_file.Duplicate();
+ ui::ResourceBundle::InitSharedInstanceWithPakFileRegion(
+ pak_file_2.Pass(), base::MemoryMappedFile::Region::kWholeFile);
+ }
mojo::logging::InitLogging();
- base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
-
if (command_line->HasSwitch(kDisableEncryptedMedia))
blink::WebRuntimeFeatures::enableEncryptedMedia(false);
blink_settings_->Init();
- base::File pak_file = resource_loader_.ReleaseFile(kResourceResourcesPak);
- base::File pak_file_2 = pak_file.Duplicate();
- ui::ResourceBundle::InitSharedInstanceWithPakFileRegion(
- pak_file.Pass(), base::MemoryMappedFile::Region::kWholeFile);
// TODO(sky): why is this always using 100?
ui::ResourceBundle::GetSharedInstance().AddDataPackFromFile(
- pak_file_2.Pass(), ui::SCALE_FACTOR_100P);
+ pak_file.Pass(), ui::SCALE_FACTOR_100P);
compositor_thread_.Start();
diff --git a/components/html_viewer/web_layer_tree_view_impl.cc b/components/html_viewer/web_layer_tree_view_impl.cc
index c5e9850..92e10b6 100644
--- a/components/html_viewer/web_layer_tree_view_impl.cc
+++ b/components/html_viewer/web_layer_tree_view_impl.cc
@@ -15,6 +15,7 @@
#include "components/mus/public/cpp/window.h"
#include "mojo/converters/surfaces/surfaces_type_converters.h"
#include "third_party/WebKit/public/web/WebWidget.h"
+#include "third_party/mojo/src/mojo/public/c/gles2/gles2.h"
#include "ui/gfx/buffer_types.h"
namespace html_viewer {
diff --git a/components/mus/BUILD.gn b/components/mus/BUILD.gn
index 2466dea..7001e29 100644
--- a/components/mus/BUILD.gn
+++ b/components/mus/BUILD.gn
@@ -83,4 +83,11 @@ source_set("lib") {
"//ui/platform_window:platform_impls",
"//ui/platform_window:platform_window",
]
+
+ if (use_x11) {
+ public_configs = [ "//build/config/linux:x11" ]
+ public_deps = [
+ "//ui/events/platform/x11",
+ ]
+ }
}
diff --git a/components/mus/example/window_type_launcher/BUILD.gn b/components/mus/example/window_type_launcher/BUILD.gn
index bdf6224..e1b2e2a 100644
--- a/components/mus/example/window_type_launcher/BUILD.gn
+++ b/components/mus/example/window_type_launcher/BUILD.gn
@@ -20,6 +20,7 @@ executable("window_type_launcher") {
deps = [
":window_type_launcher_resources",
"//base",
+ "//base:base_static",
"//mojo/application/public/cpp",
"//mojo/application/public/interfaces",
"//mojo/common:common_base",
@@ -29,7 +30,7 @@ executable("window_type_launcher") {
"//mojo/runner/child:lib",
"//mojo/runner:init",
"//skia",
- "//third_party/mojo/src/mojo/edk/embedder",
+ "//third_party/mojo/src/mojo/edk/system",
"//third_party/mojo/src/mojo/public/cpp/bindings",
"//ui/aura",
"//ui/gfx",
diff --git a/components/mus/gles2/BUILD.gn b/components/mus/gles2/BUILD.gn
index 9c0929f..e39037d23 100644
--- a/components/mus/gles2/BUILD.gn
+++ b/components/mus/gles2/BUILD.gn
@@ -34,8 +34,9 @@ source_set("gles2") {
"//base",
"//components/mus/public/interfaces",
"//gpu/command_buffer/client",
+ "//gpu/command_buffer/common:gles2_utils",
"//gpu/command_buffer/service",
- "//gpu/config:config_sources",
+ "//gpu/config:config",
"//mojo/converters/geometry",
"//third_party/mojo/src/mojo/public/cpp/bindings",
"//ui/mojo/geometry:interfaces",
@@ -45,9 +46,9 @@ source_set("gles2") {
]
if (is_android) {
- deps += [ "//mojo/platform_handle:defs" ]
+ deps += [ "//mojo/platform_handle:platform_handle_impl" ]
} else {
- deps += [ "//mojo/platform_handle" ]
+ deps += [ "//mojo/platform_handle:for_shared_library" ]
}
include_dirs = [ "../.." ]
@@ -73,7 +74,7 @@ source_set("lib") {
"//components/mus/public/interfaces",
"//gpu/command_buffer/common",
"//gpu/command_buffer/client",
- "//gpu/config:config_sources",
+ "//gpu/config:config",
"//third_party/mojo/src/mojo/public/cpp/bindings",
"//third_party/mojo/src/mojo/public/cpp/system",
"//ui/gfx",
diff --git a/components/mus/public/cpp/BUILD.gn b/components/mus/public/cpp/BUILD.gn
index f4deb64..69712a0 100644
--- a/components/mus/public/cpp/BUILD.gn
+++ b/components/mus/public/cpp/BUILD.gn
@@ -2,10 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-import("//third_party/mojo/src/mojo/public/mojo_sdk.gni")
-
-mojo_sdk_source_set("cpp") {
- restrict_external_deps = false
+source_set("cpp") {
sources = [
"context_provider.h",
"event_matcher.h",
@@ -55,18 +52,13 @@ mojo_sdk_source_set("cpp") {
"//mojo/converters/surfaces",
"//mojo/gles2:headers",
"//mojo/gpu:mojo_gles2_implementation",
+ "//third_party/mojo/src/mojo/public/cpp/bindings:bindings",
"//third_party/mojo/src/mojo/public/cpp/environment",
"//third_party/mojo/src/mojo/public/cpp/system",
"//ui/gfx/geometry",
"//ui/mojo/geometry:interfaces",
]
- mojo_sdk_deps = [
- "mojo/public/c/gles2:headers",
- "mojo/public/cpp/bindings:bindings",
- "mojo/public/cpp/system",
- ]
-
data_deps = [
"//components/mus",
]
diff --git a/components/mus/public/cpp/context_provider.h b/components/mus/public/cpp/context_provider.h
index 12c77fd..18aa137 100644
--- a/components/mus/public/cpp/context_provider.h
+++ b/components/mus/public/cpp/context_provider.h
@@ -9,7 +9,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/synchronization/lock.h"
#include "cc/output/context_provider.h"
-#include "third_party/mojo/src/mojo/public/c/gles2/gles2.h"
+#include "third_party/mojo/src/mojo/public/c/gles2/gles2_types.h"
#include "third_party/mojo/src/mojo/public/cpp/system/core.h"
namespace mus {
diff --git a/components/mus/public/cpp/tests/BUILD.gn b/components/mus/public/cpp/tests/BUILD.gn
index ac9fa94..9787e49 100644
--- a/components/mus/public/cpp/tests/BUILD.gn
+++ b/components/mus/public/cpp/tests/BUILD.gn
@@ -49,7 +49,7 @@ test("mojo_view_manager_lib_unittests") {
"//components/mus/public/cpp",
"//mojo/application/public/cpp",
"//mojo/gles2",
- "//mojo/runner:platform_handle",
+ "//mojo/platform_handle:platform_handle_impl",
"//testing/gtest",
"//third_party/mojo/src/mojo/public/cpp/system",
"//third_party/mojo/src/mojo/edk/system",
diff --git a/components/pdf_viewer/BUILD.gn b/components/pdf_viewer/BUILD.gn
index bb8f5e6..4ec5149 100644
--- a/components/pdf_viewer/BUILD.gn
+++ b/components/pdf_viewer/BUILD.gn
@@ -15,8 +15,6 @@ mojo_native_application("pdf_viewer") {
"//base",
"//components/mus/public/interfaces",
"//components/mus/public/cpp",
- "//components/resource_provider/public/cpp",
- "//components/resource_provider/public/interfaces",
"//components/web_view/public/interfaces",
"//gpu",
"//mojo/application/public/cpp",
@@ -24,7 +22,6 @@ mojo_native_application("pdf_viewer") {
"//mojo/common:common_base",
"//mojo/converters/input_events",
"//mojo/converters/surfaces",
- "//mojo/platform_handle",
"//mojo/services/network/public/cpp",
"//mojo/services/network/public/interfaces",
"//mojo/services/tracing/public/cpp",
diff --git a/components/resource_provider/BUILD.gn b/components/resource_provider/BUILD.gn
index 9985579..5d26584 100644
--- a/components/resource_provider/BUILD.gn
+++ b/components/resource_provider/BUILD.gn
@@ -36,6 +36,7 @@ if (is_android) {
"//build/config/sanitizers:deps",
"//components/resource_provider/public/interfaces",
"//mojo/environment:chromium",
+ "//mojo/platform_handle:for_shared_library",
"//third_party/mojo/src/mojo/public/c/system:for_shared_library",
"//url",
]
@@ -97,7 +98,6 @@ source_set("lib") {
"//components/resource_provider/public/interfaces",
"//mojo/application/public/cpp",
"//mojo/common:common_base",
- "//mojo/platform_handle",
"//url",
]
}
@@ -113,6 +113,7 @@ test("resource_provider_unittests") {
"//base/test:test_config",
"//components/resource_provider/public/interfaces",
"//mojo/environment:chromium",
+ "//mojo/platform_handle:for_shared_library",
"//testing/gtest",
"//third_party/mojo/src/mojo/edk/test:run_all_unittests",
"//url",
@@ -138,7 +139,6 @@ mojo_native_application("apptests") {
"//components/resource_provider/public/cpp",
"//components/resource_provider/public/interfaces",
"//mojo/application/public/cpp:test_support",
- "//mojo/platform_handle",
]
data_deps = [
diff --git a/components/resource_provider/file_utils.cc b/components/resource_provider/file_utils.cc
index 54bdd90..5aeccdf 100644
--- a/components/resource_provider/file_utils.cc
+++ b/components/resource_provider/file_utils.cc
@@ -8,7 +8,6 @@
#include "base/path_service.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
-#include "url/gurl.h"
namespace resource_provider {
namespace {
@@ -27,18 +26,30 @@ bool IsPathNameValid(const std::string& name) {
} // namespace
-base::FilePath GetPathForApplicationUrl(const GURL& application_url) {
- if (application_url.scheme() != "mojo" && application_url.scheme() != "exe")
+base::FilePath GetPathForApplicationUrl(const std::string& application_url) {
+// We don't want to use GURL because it can behave differently depending on
+ // whether mojo:// has been registered as a standard scheme or not. Also, we
+ // can get mojo:foo or mojo://foo urls here.
+ std::string path = application_url;
+ if (!base::StartsWith(path, "mojo:", base::CompareCase::INSENSITIVE_ASCII) &&
+ !base::StartsWith(path, "exe:", base::CompareCase::INSENSITIVE_ASCII))
return base::FilePath();
-
- std::string path = application_url.path();
+ if (path.find('.') != std::string::npos)
+ return base::FilePath();
+ if (base::StartsWith(path, "mojo:", base::CompareCase::INSENSITIVE_ASCII))
+ path.erase(path.begin(), path.begin() + 5);
+ else
+ path.erase(path.begin(), path.begin() + 4);
base::TrimString(path, "/", &path);
+ size_t end_of_name = path.find('/');
+ if (end_of_name != std::string::npos)
+ path.erase(path.begin() + end_of_name, path.end());
// TODO(beng): I'm adding this because there is a collision between the
// executable name in the exe dir and the resource package dir on
// non-Windows systems. Arbitrary exes should probably load their
// resources themselves rather than use resource provider.
- if (application_url.SchemeIs("exe"))
+ if (base::StartsWith(path, "exe:", base::CompareCase::INSENSITIVE_ASCII))
path += "_res";
if (!IsPathNameValid(path))
diff --git a/components/resource_provider/file_utils.h b/components/resource_provider/file_utils.h
index 7ddf947..9f5ce62 100644
--- a/components/resource_provider/file_utils.h
+++ b/components/resource_provider/file_utils.h
@@ -7,8 +7,6 @@
#include <string>
-class GURL;
-
namespace base {
class FilePath;
}
@@ -17,7 +15,7 @@ namespace resource_provider {
// Returns the path to the resources for |application_url|, or an empty
// path if |application_url| is not valid.
-base::FilePath GetPathForApplicationUrl(const GURL& application_url);
+base::FilePath GetPathForApplicationUrl(const std::string& application_url);
// Returns the path to the specified resource. |app_path| was previously
// obtained by way of GetPathForApplicationUrl().
diff --git a/components/resource_provider/file_utils_unittest.cc b/components/resource_provider/file_utils_unittest.cc
index 96de984..0e33fe1 100644
--- a/components/resource_provider/file_utils_unittest.cc
+++ b/components/resource_provider/file_utils_unittest.cc
@@ -26,8 +26,8 @@ TEST(FileUtilsTest, InvalidAppPath) {
};
for (size_t i = 0; i < arraysize(invalid_cases); ++i) {
- const GURL url(invalid_cases[i].url);
- base::FilePath resulting_path(GetPathForApplicationUrl(url));
+ base::FilePath resulting_path(GetPathForApplicationUrl(
+ invalid_cases[i].url));
EXPECT_TRUE(resulting_path.empty()) << "i=" << i
<< " input=" << invalid_cases[i].url
<< " result=" << resulting_path.value();
@@ -50,7 +50,7 @@ TEST(FileUtilsTest, InvalidResourcePath) {
{"bar//baz/"},
};
- const base::FilePath app_path(GetPathForApplicationUrl(GURL("mojo:test")));
+ const base::FilePath app_path(GetPathForApplicationUrl("mojo:test"));
ASSERT_FALSE(app_path.empty());
for (size_t i = 0; i < arraysize(invalid_cases); ++i) {
@@ -63,7 +63,7 @@ TEST(FileUtilsTest, InvalidResourcePath) {
}
TEST(FileUtilsTest, ValidPaths) {
- const base::FilePath app_path(GetPathForApplicationUrl(GURL("mojo:test")));
+ const base::FilePath app_path(GetPathForApplicationUrl("mojo:test"));
ASSERT_FALSE(app_path.empty());
// Trivial single path element.
diff --git a/components/resource_provider/public/cpp/BUILD.gn b/components/resource_provider/public/cpp/BUILD.gn
index 8cfa313..5d21378 100644
--- a/components/resource_provider/public/cpp/BUILD.gn
+++ b/components/resource_provider/public/cpp/BUILD.gn
@@ -14,6 +14,7 @@ source_set("cpp") {
"//mojo/application/public/cpp",
"//mojo/application/public/interfaces",
"//mojo/common",
+ "//mojo/platform_handle:for_shared_library",
"//third_party/mojo/src/mojo/public/cpp/bindings",
"//third_party/mojo/src/mojo/public/cpp/system",
]
diff --git a/components/resource_provider/resource_provider_app.cc b/components/resource_provider/resource_provider_app.cc
index b835b208a..c7cd6fa 100644
--- a/components/resource_provider/resource_provider_app.cc
+++ b/components/resource_provider/resource_provider_app.cc
@@ -25,7 +25,7 @@ void ResourceProviderApp::Initialize(mojo::ApplicationImpl* app) {
bool ResourceProviderApp::ConfigureIncomingConnection(
mojo::ApplicationConnection* connection) {
const base::FilePath app_path(
- GetPathForApplicationUrl(GURL(connection->GetRemoteApplicationURL())));
+ GetPathForApplicationUrl(connection->GetRemoteApplicationURL()));
if (app_path.empty())
return false; // The specified app has no resources.
@@ -37,7 +37,7 @@ void ResourceProviderApp::Create(
mojo::ApplicationConnection* connection,
mojo::InterfaceRequest<ResourceProvider> request) {
const base::FilePath app_path(
- GetPathForApplicationUrl(GURL(connection->GetRemoteApplicationURL())));
+ GetPathForApplicationUrl(connection->GetRemoteApplicationURL()));
// We validated path at ConfigureIncomingConnection() time, so it should still
// be valid.
CHECK(!app_path.empty());
diff --git a/components/resource_provider/resource_provider_impl.cc b/components/resource_provider/resource_provider_impl.cc
index c93c3e2..3f14e76 100644
--- a/components/resource_provider/resource_provider_impl.cc
+++ b/components/resource_provider/resource_provider_impl.cc
@@ -70,7 +70,7 @@ void ResourceProviderImpl::GetResources(mojo::Array<mojo::String> paths,
void ResourceProviderImpl::GetICUHandle(const GetICUHandleCallback& callback) {
const base::FilePath resource_app_path(
- GetPathForApplicationUrl(GURL(resource_provider_app_url_)));
+ GetPathForApplicationUrl(resource_provider_app_url_));
mojo::ScopedHandle handle = GetHandleForPath(
GetPathForResourceNamed(resource_app_path, kResourceIcudtl));
callback.Run(handle.Pass());
diff --git a/gpu/command_buffer/common/capabilities.h b/gpu/command_buffer/common/capabilities.h
index 532c2df..5137928 100644
--- a/gpu/command_buffer/common/capabilities.h
+++ b/gpu/command_buffer/common/capabilities.h
@@ -33,7 +33,7 @@ struct GPU_EXPORT Capabilities {
int precision;
};
- struct PerStagePrecisions {
+ struct GPU_EXPORT PerStagePrecisions {
PerStagePrecisions();
ShaderPrecision low_int;
diff --git a/mandoline/BUILD.gn b/mandoline/BUILD.gn
index bc32cb0..e077bf0 100644
--- a/mandoline/BUILD.gn
+++ b/mandoline/BUILD.gn
@@ -12,15 +12,13 @@ group("all") {
":tests",
]
- if (!is_component_build) {
- if (is_android) {
- deps += [ "//mandoline/app/android" ]
- } else {
- deps += [
- "//components/mus/example",
- "//mandoline/app/desktop",
- ]
- }
+ if (is_android) {
+ deps += [ "//mandoline/app/android" ]
+ } else {
+ deps += [
+ "//components/mus/example",
+ "//mandoline/app/desktop",
+ ]
}
}
@@ -38,7 +36,7 @@ group("tests") {
deps += [ "//tools/xdisplaycheck" ]
}
- if (!is_component_build && !is_mac) {
+ if (!is_mac) {
deps += [
"//components/clipboard:apptests",
"//components/filesystem:apptests",
diff --git a/media/cdm/default_cdm_factory.h b/media/cdm/default_cdm_factory.h
index 78d4f2f..1c7b0c7 100644
--- a/media/cdm/default_cdm_factory.h
+++ b/media/cdm/default_cdm_factory.h
@@ -7,12 +7,13 @@
#include "base/macros.h"
#include "media/base/cdm_factory.h"
+#include "media/base/media_export.h"
namespace media {
struct CdmConfig;
-class DefaultCdmFactory : public CdmFactory {
+class MEDIA_EXPORT DefaultCdmFactory : public CdmFactory {
public:
DefaultCdmFactory();
~DefaultCdmFactory() final;
diff --git a/media/mojo/services/BUILD.gn b/media/mojo/services/BUILD.gn
index c478c09..ee178a7c 100644
--- a/media/mojo/services/BUILD.gn
+++ b/media/mojo/services/BUILD.gn
@@ -184,54 +184,52 @@ test("media_mojo_unittests") {
]
}
-if (!is_component_build) {
- mojo_native_application("media") {
- sources = [
- "main.cc",
- ]
+mojo_native_application("media") {
+ sources = [
+ "main.cc",
+ ]
- deps = [
- ":application",
- "//third_party/mojo/src/mojo/public/c/system:for_shared_library",
- ]
- }
+ deps = [
+ ":application",
+ "//third_party/mojo/src/mojo/public/c/system:for_shared_library",
+ ]
+}
- # Note, the following tests must be loaded via mojo_runner as an app, e.g.
- #
- # out/Debug/mojo_runner mojo:media_apptests
- # out/Debug/mojo_runner mojo:media_pipeline_integration_apptests
- #
- mojo_native_application("media_apptests") {
- testonly = true
+# Note, the following tests must be loaded via mojo_runner as an app, e.g.
+#
+# out/Debug/mojo_runner mojo:media_apptests
+# out/Debug/mojo_runner mojo:media_pipeline_integration_apptests
+#
+mojo_native_application("media_apptests") {
+ testonly = true
- sources = [
- "media_apptest.cc",
- ]
+ sources = [
+ "media_apptest.cc",
+ ]
- deps = [
- ":proxy",
- "//media/base:test_support",
- "//mojo/application/public/cpp:test_support",
- "//testing/gmock",
- "//testing/gtest",
- ]
+ deps = [
+ ":proxy",
+ "//media/base:test_support",
+ "//mojo/application/public/cpp:test_support",
+ "//testing/gmock",
+ "//testing/gtest",
+ ]
- data_deps = [
- ":media",
- ]
- }
+ data_deps = [
+ ":media",
+ ]
+}
- mojo_native_application("media_pipeline_integration_apptests") {
- testonly = true
+mojo_native_application("media_pipeline_integration_apptests") {
+ testonly = true
- deps = [
- "//media/test:mojo_pipeline_integration_tests",
- ]
+ deps = [
+ "//media/test:mojo_pipeline_integration_tests",
+ ]
- data_deps = [
- ":media",
- ]
- }
+ data_deps = [
+ ":media",
+ ]
}
group("services") {
diff --git a/media/mojo/services/mojo_renderer_factory.h b/media/mojo/services/mojo_renderer_factory.h
index 64b6838..01a325a 100644
--- a/media/mojo/services/mojo_renderer_factory.h
+++ b/media/mojo/services/mojo_renderer_factory.h
@@ -17,7 +17,7 @@ class ServiceFactory;
}
// The default factory class for creating MojoRendererImpl.
-class MEDIA_EXPORT MojoRendererFactory : public RendererFactory {
+class MojoRendererFactory : public RendererFactory {
public:
explicit MojoRendererFactory(interfaces::ServiceFactory* service_factory);
~MojoRendererFactory() final;
diff --git a/media/test/BUILD.gn b/media/test/BUILD.gn
index c4f4d4d..3ce4648 100644
--- a/media/test/BUILD.gn
+++ b/media/test/BUILD.gn
@@ -77,40 +77,38 @@ source_set("pipeline_integration_perftests") {
}
}
-if (!is_component_build) {
- source_set("mojo_pipeline_integration_tests") {
- testonly = true
-
- if (media_use_ffmpeg && !is_android) {
- sources = [
- "pipeline_integration_test.cc",
- ]
-
- defines = [ "MOJO_RENDERER" ]
-
- configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
-
- deps = [
- ":pipeline_integration_test_base",
- "//base",
- "//base/test:test_support",
- "//media",
- "//media:test_support",
- "//media/audio:test_support",
- "//media/base:test_support",
- "//media/mojo/interfaces",
- "//media/mojo/services:proxy",
- "//media/mojo/services:renderer_service",
- "//mojo/application/public/cpp:test_support",
- "//testing/gtest",
- "//ui/gfx/geometry",
- "//ui/gfx:test_support",
-
- # TODO(dalecurtis): Required since the gmock header is included in the
- # header for pipeline_integration_test_base.h. This should be moved
- # into the .cc file to avoid the extra dependency here.
- "//testing/gmock",
- ]
- }
+source_set("mojo_pipeline_integration_tests") {
+ testonly = true
+
+ if (media_use_ffmpeg && !is_android) {
+ sources = [
+ "pipeline_integration_test.cc",
+ ]
+
+ defines = [ "MOJO_RENDERER" ]
+
+ configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
+
+ deps = [
+ ":pipeline_integration_test_base",
+ "//base",
+ "//base/test:test_support",
+ "//media",
+ "//media:test_support",
+ "//media/audio:test_support",
+ "//media/base:test_support",
+ "//media/mojo/interfaces",
+ "//media/mojo/services:proxy",
+ "//media/mojo/services:renderer_service",
+ "//mojo/application/public/cpp:test_support",
+ "//testing/gtest",
+ "//ui/gfx/geometry",
+ "//ui/gfx:test_support",
+
+ # TODO(dalecurtis): Required since the gmock header is included in the
+ # header for pipeline_integration_test_base.h. This should be moved
+ # into the .cc file to avoid the extra dependency here.
+ "//testing/gmock",
+ ]
}
}
diff --git a/mojo/BUILD.gn b/mojo/BUILD.gn
index 04f79cb..584421b 100644
--- a/mojo/BUILD.gn
+++ b/mojo/BUILD.gn
@@ -24,9 +24,7 @@ group("mojo") {
deps += [ "//mojo/android" ]
}
- if (!is_component_build) {
- deps += [ "//mojo/runner" ]
- }
+ deps += [ "//mojo/runner" ]
}
# TODO(GYP): Delete this after we've converted everything to GN.
@@ -96,17 +94,15 @@ group("tests") {
"//third_party/mojo/src/mojo/edk/test:mojo_public_utility_unittests",
]
- if (!is_component_build) {
- deps += [
- "//mojo/package_manager:unittests",
- "//mojo/runner:apptests",
- "//mojo/runner:mojo_runner_unittests",
- "//mojo/services/network:apptests",
- "//mojo/shell:mojo_shell_unittests",
- ]
+ deps += [
+ "//mojo/package_manager:unittests",
+ "//mojo/runner:apptests",
+ "//mojo/runner:mojo_runner_unittests",
+ "//mojo/services/network:apptests",
+ "//mojo/shell:mojo_shell_unittests",
+ ]
- if (is_android) {
- deps += [ "//mojo/runner:mojo_runner_apptests_apk" ]
- }
+ if (is_android) {
+ deps += [ "//mojo/runner:mojo_runner_apptests_apk" ]
}
}
diff --git a/mojo/common/data_pipe_drainer.h b/mojo/common/data_pipe_drainer.h
index 906d040..19af32d 100644
--- a/mojo/common/data_pipe_drainer.h
+++ b/mojo/common/data_pipe_drainer.h
@@ -7,13 +7,14 @@
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
+#include "mojo/common/mojo_common_export.h"
#include "mojo/message_pump/handle_watcher.h"
#include "third_party/mojo/src/mojo/public/cpp/system/core.h"
namespace mojo {
namespace common {
-class DataPipeDrainer {
+class MOJO_COMMON_EXPORT DataPipeDrainer {
public:
class Client {
public:
diff --git a/mojo/common/user_agent.h b/mojo/common/user_agent.h
index 741ef8f..031b102 100644
--- a/mojo/common/user_agent.h
+++ b/mojo/common/user_agent.h
@@ -12,7 +12,7 @@
namespace mojo {
namespace common {
-std::string GetUserAgent();
+std::string MOJO_COMMON_EXPORT GetUserAgent();
} // namespace common
} // namespace mojo
diff --git a/mojo/converters/surfaces/surfaces_type_converters.h b/mojo/converters/surfaces/surfaces_type_converters.h
index a172a8d..765cb31 100644
--- a/mojo/converters/surfaces/surfaces_type_converters.h
+++ b/mojo/converters/surfaces/surfaces_type_converters.h
@@ -198,7 +198,7 @@ struct MOJO_SURFACES_EXPORT
const mus::mojom::CompositorFrameMetadataPtr& input);
};
-scoped_ptr<cc::CompositorFrame> ConvertToCompositorFrame(
+MOJO_SURFACES_EXPORT scoped_ptr<cc::CompositorFrame> ConvertToCompositorFrame(
const mus::mojom::CompositorFramePtr& input,
CustomSurfaceConverter* custom_converter);
diff --git a/mojo/gles2/BUILD.gn b/mojo/gles2/BUILD.gn
index cfb331a..39912e3 100644
--- a/mojo/gles2/BUILD.gn
+++ b/mojo/gles2/BUILD.gn
@@ -22,12 +22,13 @@ source_set("headers") {
"//gpu/command_buffer/client",
"//gpu/command_buffer/client:gles2_implementation",
"//gpu/command_buffer/common",
- "//third_party/mojo/src/mojo/public/c/gles2:headers",
+ "//third_party/mojo/src/mojo/public/c/gles2",
"//third_party/mojo/src/mojo/public/cpp/bindings",
]
}
-source_set("gles2") {
+component("gles2") {
+ output_name = "mojo_gles2_impl"
sources = [
"command_buffer_client_impl.cc",
"command_buffer_client_impl.h",
@@ -57,15 +58,18 @@ source_set("gles2") {
"//gpu/command_buffer/client:gles2_cmd_helper",
"//gpu/command_buffer/client:gles2_implementation",
"//gpu/command_buffer/client:gles2_interface",
- "//gpu/command_buffer/service:service_sources",
"//gpu/command_buffer/common",
"//mojo/environment:chromium",
- "//mojo/platform_handle:defs",
- "//third_party/mojo/src/mojo/public/c/gles2:headers",
- "//third_party/mojo/src/mojo/public/c/system",
+ "//mojo/platform_handle:for_component",
+ "//third_party/mojo/src/mojo/public/c/gles2",
+ "//third_party/mojo/src/mojo/public/c/system:for_component",
"//third_party/mojo/src/mojo/public/cpp/bindings",
"//third_party/mojo/src/mojo/public/cpp/system",
]
+ if (!is_component_build) {
+ deps += [ "//gpu/command_buffer/service:service_sources" ]
+ }
+
include_dirs = [ ".." ]
}
diff --git a/mojo/gles2/gles2_impl.cc b/mojo/gles2/gles2_impl.cc
index 448e6c4..d9c42a6 100644
--- a/mojo/gles2/gles2_impl.cc
+++ b/mojo/gles2/gles2_impl.cc
@@ -9,6 +9,9 @@
#include "gpu/GLES2/gl2extchromium.h"
#include "gpu/command_buffer/client/gles2_interface.h"
#include "mojo/gles2/gles2_context.h"
+// Even though this isn't used here, we need to include it to get the symbols to
+// be exported in component build.
+#include "third_party/mojo/src/mojo/public/c/gles2/chromium_extension.h"
using gles2::GLES2Context;
diff --git a/mojo/platform_handle/BUILD.gn b/mojo/platform_handle/BUILD.gn
index f224dd9..2afc90a 100644
--- a/mojo/platform_handle/BUILD.gn
+++ b/mojo/platform_handle/BUILD.gn
@@ -2,42 +2,76 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+# See comments in third_party/mojo/src/mojo/public/c/system/BUILD.gn which this
+# is based on.
+# Summary: depend on this target to use the platform handle functions without
+# linking against a specific implementation.
+# For component targets, add //mojo/platform_handle:for_component to your deps
+# section.
+# For shared_library targets (e.g., a Mojo App), add
+# //mojo/platform_handle:for_shared_library to your deps.
source_set("platform_handle") {
sources = [
- "platform_handle_private_thunks.cc",
- "platform_handle_private_thunks.h",
+ "platform_handle.h",
+ "platform_handle_functions.h",
]
-
deps = [
"//third_party/mojo/src/mojo/public/c/system",
]
+}
+component("platform_handle_impl") {
+ output_name = "platform_handle_impl"
public_deps = [
- ":defs",
+ ":platform_handle",
+ ]
+ sources = [
+ "platform_handle_functions.cc",
]
-
defines = [ "PLATFORM_HANDLE_IMPLEMENTATION" ]
+ deps = [
+ "//base",
+ "//third_party/mojo/src/mojo/edk/embedder:headers",
+ "//third_party/mojo/src/mojo/public/c/system:for_component",
+ ]
}
-# Only targets that are registering the thunks or get linked into the runner
-# depend upon this target. The rest should use the |platform_handle| target
-# above.
-source_set("defs") {
- visibility = [
+source_set("platform_handle_thunks") {
+ public_deps = [
":platform_handle",
- "//components/font_service/public/cpp",
- "//components/mus/gles2",
- "//mojo/gles2",
- "//mojo/runner:platform_handle",
]
-
sources = [
- "platform_handle.h",
- "platform_handle_exports.h",
- "platform_handle_functions.h",
+ "platform_handle_private_thunks.cc",
+ "platform_handle_private_thunks.h",
]
-
+ defines = [ "PLATFORM_HANDLE_IMPLEMENTATION" ]
deps = [
"//third_party/mojo/src/mojo/public/c/system",
]
}
+
+group("for_shared_library") {
+ public_deps = [
+ ":platform_handle",
+ ]
+ if (is_component_build) {
+ deps = [
+ ":platform_handle_impl",
+ ]
+ } else {
+ deps = [
+ ":platform_handle_thunks",
+ ]
+ }
+}
+
+group("for_component") {
+ public_deps = [
+ ":platform_handle",
+ ]
+ if (is_component_build) {
+ deps = [
+ ":platform_handle_impl",
+ ]
+ }
+}
diff --git a/mojo/platform_handle/platform_handle_exports.h b/mojo/platform_handle/platform_handle_exports.h
index 6c57f9b..82fffd9 100644
--- a/mojo/platform_handle/platform_handle_exports.h
+++ b/mojo/platform_handle/platform_handle_exports.h
@@ -5,7 +5,7 @@
#ifndef MOJO_PLATFORM_HANDLE_PLATFORM_HANDLE_EXPORTS_H_
#define MOJO_PLATFORM_HANDLE_PLATFORM_HANDLE_EXPORTS_H_
-#if defined(COMPONENT_BUILD) && defined(MOJO_USE_SYSTEM_IMPL)
+#if defined(COMPONENT_BUILD)
#if defined(WIN32)
#if defined(PLATFORM_HANDLE_IMPLEMENTATION)
@@ -24,10 +24,10 @@
#endif // defined(WIN32)
-#else // !defined(COMPONENT_BUILD) || !defined(MOJO_USE_SYSTEM_IMPL)
+#else // !defined(COMPONENT_BUILD)
#define PLATFORM_HANDLE_EXPORT
-#endif // defined(COMPONENT_BUILD) && defined(MOJO_USE_SYSTEM_IMPL)
+#endif // defined(COMPONENT_BUILD)
#endif // MOJO_PLATFORM_HANDLE_PLATFORM_HANDLE_EXPORTS_H_
diff --git a/mojo/runner/platform_handle_impl.cc b/mojo/platform_handle/platform_handle_functions.cc
index c5e7999..1359dda 100644
--- a/mojo/runner/platform_handle_impl.cc
+++ b/mojo/platform_handle/platform_handle_functions.cc
@@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "mojo/platform_handle/platform_handle.h"
+#include "mojo/platform_handle/platform_handle_functions.h"
+
#include "third_party/mojo/src/mojo/edk/embedder/embedder.h"
extern "C" {
diff --git a/mojo/public/mojo_application.gni b/mojo/public/mojo_application.gni
index 364a092..1609b02 100644
--- a/mojo/public/mojo_application.gni
+++ b/mojo/public/mojo_application.gni
@@ -95,13 +95,12 @@ template("mojo_native_application") {
}
deps = rebase_path([
- "mojo/public/c/system",
- "mojo/public/platform/native:gles2",
- "mojo/public/platform/native:system",
+ "mojo/public/gles2:for_shared_library",
+ "mojo/public/c/system:for_shared_library",
],
".",
mojo_root)
- deps += [ "//mojo/platform_handle" ]
+ deps += [ "//mojo/platform_handle:for_shared_library" ]
deps += mojo_deps
if (defined(invoker.public_deps)) {
diff --git a/mojo/runner/BUILD.gn b/mojo/runner/BUILD.gn
index 6dd9642..92a2342 100644
--- a/mojo/runner/BUILD.gn
+++ b/mojo/runner/BUILD.gn
@@ -7,10 +7,6 @@ import("//mojo/public/mojo_application.gni")
import("//testing/test.gni")
import("//third_party/mojo/src/mojo/public/tools/bindings/mojom.gni")
-# We don't support building in the component build since mojo apps are
-# inherently components.
-assert(!is_component_build)
-
group("runner") {
testonly = true
@@ -200,21 +196,6 @@ source_set("lib") {
check_includes = false
}
-source_set("platform_handle") {
- sources = [
- "platform_handle_impl.cc",
- ]
-
- public_deps = [
- "//third_party/mojo/src/mojo/public/cpp/bindings",
- ]
-
- deps = [
- "//mojo/platform_handle:defs",
- "//third_party/mojo/src/mojo/edk/embedder:embedder",
- ]
-}
-
source_set("native_application_support") {
sources = [
"native_application_support.cc",
@@ -222,9 +203,9 @@ source_set("native_application_support") {
]
deps = [
- ":platform_handle",
"//base",
"//mojo/gles2",
+ "//mojo/platform_handle:platform_handle_impl",
"//mojo/shell",
]
diff --git a/mojo/runner/child/BUILD.gn b/mojo/runner/child/BUILD.gn
index fae89c0..0bd6786 100644
--- a/mojo/runner/child/BUILD.gn
+++ b/mojo/runner/child/BUILD.gn
@@ -25,7 +25,7 @@ source_set("lib") {
"//mojo/application/public/interfaces",
"//mojo/gles2",
"//mojo/message_pump",
- "//mojo/runner:platform_handle",
+ "//mojo/platform_handle:for_shared_library",
"//third_party/mojo/src/mojo/edk/system",
]
}
@@ -90,12 +90,13 @@ executable("native_target") {
":apptest_interfaces",
":lib",
"//base",
+ "//base:base_static",
"//mojo/application/public/cpp",
"//mojo/application/public/interfaces",
"//mojo/common:common_base",
"//mojo/gles2",
"//mojo/message_pump",
"//mojo/runner:init",
- "//third_party/mojo/src/mojo/edk/embedder:embedder",
+ "//third_party/mojo/src/mojo/edk/system",
]
}
diff --git a/mojo/runner/native_application_support.cc b/mojo/runner/native_application_support.cc
index e1e35dc..0e46803 100644
--- a/mojo/runner/native_application_support.cc
+++ b/mojo/runner/native_application_support.cc
@@ -56,6 +56,9 @@ bool RunNativeApplication(base::NativeLibrary app_library,
if (!app_library)
return false;
+// Thunks aren't needed/used in component build, since the thunked methods
+// just live in their own dynamically loaded library.
+#if !defined(COMPONENT_BUILD)
if (!SetThunks(&MojoMakeSystemThunks, "MojoSetSystemThunks", app_library)) {
LOG(ERROR) << "MojoSetSystemThunks not found";
return false;
@@ -104,6 +107,7 @@ bool RunNativeApplication(base::NativeLibrary app_library,
// Apps need not include platform handle thunks.
SetThunks(&MojoMakePlatformHandlePrivateThunks,
"MojoSetPlatformHandlePrivateThunks", app_library);
+#endif
typedef MojoResult (*MojoMainFunction)(MojoHandle);
MojoMainFunction main_function = reinterpret_cast<MojoMainFunction>(
diff --git a/mojo/services/BUILD.gn b/mojo/services/BUILD.gn
index 9272f92..bc9ae26 100644
--- a/mojo/services/BUILD.gn
+++ b/mojo/services/BUILD.gn
@@ -11,11 +11,9 @@ group("services") {
"//mojo/services/network/public/interfaces",
]
- if (!is_component_build) {
- deps += [
- "//mojo/services/network",
- "//mojo/services/test_service",
- "//mojo/services/tracing",
- ]
- }
+ deps += [
+ "//mojo/services/network",
+ "//mojo/services/test_service",
+ "//mojo/services/tracing",
+ ]
}
diff --git a/third_party/mojo/src/mojo/edk/embedder/BUILD.gn b/third_party/mojo/src/mojo/edk/embedder/BUILD.gn
index 3e4adae..f54d9cb 100644
--- a/third_party/mojo/src/mojo/edk/embedder/BUILD.gn
+++ b/third_party/mojo/src/mojo/edk/embedder/BUILD.gn
@@ -4,17 +4,22 @@
import("../mojo_edk.gni")
+mojo_edk_source_set("headers") {
+ sources = [
+ "channel_info_forward.h",
+ "configuration.h",
+ "embedder.h",
+ "embedder_internal.h",
+ ]
+}
+
mojo_edk_source_set("embedder") {
# This isn't really a standalone target; it must be linked into the
# mojo_system_impl component.
mojo_edk_visibility = [ "mojo/edk/system" ]
sources = [
- "channel_info_forward.h",
- "configuration.h",
"embedder.cc",
- "embedder.h",
- "embedder_internal.h",
"entrypoints.cc",
# Test-only code:
@@ -34,6 +39,7 @@ mojo_edk_source_set("embedder") {
public_deps = [
":delegates",
+ ":headers",
":platform",
]
diff --git a/third_party/mojo/src/mojo/public/c/gles2/BUILD.gn b/third_party/mojo/src/mojo/public/c/gles2/BUILD.gn
index 892b21b..eb7a6f2 100644
--- a/third_party/mojo/src/mojo/public/c/gles2/BUILD.gn
+++ b/third_party/mojo/src/mojo/public/c/gles2/BUILD.gn
@@ -8,14 +8,7 @@ config("gles2_config") {
defines = [ "GLES2_USE_MOJO" ]
}
-group("gles2") {
- public_configs = [ "//third_party/khronos:khronos_headers" ]
- public_deps = [
- ":headers",
- ]
-}
-
-mojo_sdk_source_set("headers") {
+mojo_sdk_source_set("gles2") {
sources = [
"chromium_extension.h",
"gles2.h",
diff --git a/third_party/mojo/src/mojo/public/c/system/BUILD.gn b/third_party/mojo/src/mojo/public/c/system/BUILD.gn
index 6a3827c..3c4b29a 100644
--- a/third_party/mojo/src/mojo/public/c/system/BUILD.gn
+++ b/third_party/mojo/src/mojo/public/c/system/BUILD.gn
@@ -33,14 +33,19 @@ mojo_sdk_source_set("system") {
# For shared_library targets (e.g., a Mojo App), add
# //mojo/public/c/system:for_shared_library to your deps
-# TODO(jamesr): Eliminate the need for these targets. crbug.com/438701
group("for_shared_library") {
public_deps = [
":system",
]
- deps = [
- "../../platform/native:system",
- ]
+ if (is_component_build) {
+ deps = [
+ "../../../edk/system",
+ ]
+ } else {
+ deps = [
+ "../../platform/native:system",
+ ]
+ }
}
group("for_component") {
diff --git a/third_party/mojo/src/mojo/public/gles2/BUILD.gn b/third_party/mojo/src/mojo/public/gles2/BUILD.gn
new file mode 100644
index 0000000..c502f34
--- /dev/null
+++ b/third_party/mojo/src/mojo/public/gles2/BUILD.gn
@@ -0,0 +1,45 @@
+# 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.
+
+# In an is_component_build build, everything can link against //mojo/gles2
+# because it is built as a shared library. However, in a static build,
+# //mojo/gles2 is linked into an executable (e.g., mojo_shell), and must be
+# injected into other shared libraries (i.e., Mojo Apps) that need the mojo
+# gles2 API.
+#
+# For component targets, add //mojo/public/gles2:for_component to your deps
+# section.
+#
+# For shared_library targets (e.g., a Mojo App), add
+# //mojo/public/gles2:for_shared_library to your deps
+
+group("for_shared_library") {
+ public_configs = [ "//third_party/khronos:khronos_headers" ]
+ public_deps = [
+ "//third_party/mojo/src/mojo/public/c/gles2",
+ ]
+
+ if (is_component_build) {
+ deps = [
+ "//mojo/gles2",
+ ]
+ } else {
+ deps = [
+ "//third_party/mojo/src/mojo/public/platform/native:gles2",
+ ]
+ }
+}
+
+group("for_component") {
+ public_configs = [ "//third_party/khronos:khronos_headers" ]
+ public_deps = [
+ "//third_party/mojo/src/mojo/public/c/gles2",
+ ]
+
+ if (is_component_build) {
+ deps = [
+ "//mojo/gles2",
+ ]
+ }
+}
diff --git a/third_party/mojo/src/mojo/public/platform/native/BUILD.gn b/third_party/mojo/src/mojo/public/platform/native/BUILD.gn
index c3b0535..aded499 100644
--- a/third_party/mojo/src/mojo/public/platform/native/BUILD.gn
+++ b/third_party/mojo/src/mojo/public/platform/native/BUILD.gn
@@ -39,7 +39,7 @@ mojo_sdk_source_set("gles2") {
configs = [ "//third_party/khronos:khronos_headers" ]
mojo_sdk_deps = [
- "mojo/public/c/gles2:headers",
+ "mojo/public/c/gles2",
"mojo/public/c/environment",
"mojo/public/c/system",
]
diff --git a/ui/platform_window/android/platform_ime_controller_android.h b/ui/platform_window/android/platform_ime_controller_android.h
index c06081e..fe7ed47 100644
--- a/ui/platform_window/android/platform_ime_controller_android.h
+++ b/ui/platform_window/android/platform_ime_controller_android.h
@@ -7,11 +7,13 @@
#include "base/android/jni_weak_ref.h"
#include "base/macros.h"
+#include "ui/platform_window/android/android_window_export.h"
#include "ui/platform_window/platform_ime_controller.h"
namespace ui {
-class PlatformImeControllerAndroid : public PlatformImeController {
+class ANDROID_WINDOW_EXPORT PlatformImeControllerAndroid :
+ public PlatformImeController {
public:
static bool Register(JNIEnv* env);
diff --git a/ui/platform_window/stub/stub_window.h b/ui/platform_window/stub/stub_window.h
index a17812a..48f74b4 100644
--- a/ui/platform_window/stub/stub_window.h
+++ b/ui/platform_window/stub/stub_window.h
@@ -5,13 +5,14 @@
#ifndef UI_PLATFORM_WINDOW_STUB_STUB_WINDOW_H_
#define UI_PLATFORM_WINDOW_STUB_STUB_WINDOW_H_
+#include "base/compiler_specific.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/platform_window/platform_window.h"
#include "ui/platform_window/stub/stub_window_export.h"
namespace ui {
-class STUB_WINDOW_EXPORT StubWindow : public PlatformWindow {
+class STUB_WINDOW_EXPORT StubWindow : NON_EXPORTED_BASE(public PlatformWindow) {
public:
explicit StubWindow(PlatformWindowDelegate* delegate);
~StubWindow() override;
diff --git a/ui/views/mus/BUILD.gn b/ui/views/mus/BUILD.gn
index 1384128..9c92efb 100644
--- a/ui/views/mus/BUILD.gn
+++ b/ui/views/mus/BUILD.gn
@@ -61,6 +61,7 @@ source_set("mus") {
"//ui/gl",
"//ui/mojo/ime:interfaces_cpp_sources",
"//ui/mojo/init",
+ "//ui/native_theme",
"//ui/views",
"//ui/wm",
]