summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/BUILD.gn1
-rw-r--r--apps/apps.gypi2
-rw-r--r--athena/athena.gyp4
-rw-r--r--athena/extensions/DEPS2
-rw-r--r--athena/extensions/athena_native_app_window_views.h2
-rw-r--r--chrome/browser/BUILD.gn4
-rw-r--r--chrome/browser/chromeos/login/DEPS2
-rw-r--r--chrome/browser/chromeos/login/kiosk_browsertest.cc2
-rw-r--r--chrome/browser/ui/BUILD.gn1
-rw-r--r--chrome/browser/ui/views/apps/DEPS2
-rw-r--r--chrome/browser/ui/views/apps/chrome_native_app_window_views.h2
-rw-r--r--chrome/chrome_browser.gypi5
-rw-r--r--chrome/chrome_browser_ui.gypi3
-rw-r--r--components/BUILD.gn5
-rw-r--r--components/OWNERS4
-rw-r--r--components/components.gyp5
-rw-r--r--components/native_app_window/DEPS10
-rw-r--r--extensions/DEPS1
-rw-r--r--extensions/components/DEPS7
-rw-r--r--extensions/components/README11
-rw-r--r--extensions/components/extensions_components.gyp19
-rw-r--r--extensions/components/native_app_window.gypi (renamed from components/native_app_window.gypi)15
-rw-r--r--extensions/components/native_app_window/BUILD.gn (renamed from components/native_app_window/BUILD.gn)1
-rw-r--r--extensions/components/native_app_window/DEPS4
-rw-r--r--extensions/components/native_app_window/OWNERS3
-rw-r--r--extensions/components/native_app_window/README2
-rw-r--r--extensions/components/native_app_window/native_app_window_views.cc (renamed from components/native_app_window/native_app_window_views.cc)2
-rw-r--r--extensions/components/native_app_window/native_app_window_views.h (renamed from components/native_app_window/native_app_window_views.h)6
28 files changed, 74 insertions, 53 deletions
diff --git a/apps/BUILD.gn b/apps/BUILD.gn
index d46feaa..3bffcf5 100644
--- a/apps/BUILD.gn
+++ b/apps/BUILD.gn
@@ -63,6 +63,7 @@ static_library("apps") {
"ui/views/app_window_frame_view.h",
]
deps += [
+ "//extensions/browser",
"//ui/strings",
"//ui/views",
]
diff --git a/apps/apps.gypi b/apps/apps.gypi
index cb8478d..7badfe3 100644
--- a/apps/apps.gypi
+++ b/apps/apps.gypi
@@ -75,7 +75,7 @@
],
['toolkit_views==1', {
'dependencies': [
- '../components/components.gyp:native_app_window',
+ '../extensions/extensions.gyp:extensions_browser',
'../ui/strings/ui_strings.gyp:ui_strings',
'../ui/views/views.gyp:views',
],
diff --git a/athena/athena.gyp b/athena/athena.gyp
index 3123556..fc42ea3 100644
--- a/athena/athena.gyp
+++ b/athena/athena.gyp
@@ -128,13 +128,13 @@
'athena_lib',
'../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
'../components/components.gyp:component_metrics_proto',
- '../components/components.gyp:native_app_window',
'../components/components.gyp:omnibox',
'../components/components.gyp:renderer_context_menu',
'../components/components.gyp:web_modal',
+ '../content/content.gyp:content_browser',
+ '../extensions/components/extensions_components.gyp:native_app_window',
'../extensions/extensions.gyp:extensions_browser',
'../extensions/extensions.gyp:extensions_common',
- '../content/content.gyp:content_browser',
'../ui/app_list/app_list.gyp:app_list',
'../ui/keyboard/keyboard.gyp:keyboard',
'../ui/keyboard/keyboard.gyp:keyboard_resources',
diff --git a/athena/extensions/DEPS b/athena/extensions/DEPS
index e8d8255..c57d7a4 100644
--- a/athena/extensions/DEPS
+++ b/athena/extensions/DEPS
@@ -2,10 +2,10 @@ include_rules = [
"+athena/env/public",
"+athena/activity/public",
"+athena/home/public",
- "+components/native_app_window",
"+content/public/browser",
"+extensions/browser",
"+extensions/common",
+ "+extensions/components/native_app_window",
"+extensions/grit",
"+ui/app_list",
"+ui/aura",
diff --git a/athena/extensions/athena_native_app_window_views.h b/athena/extensions/athena_native_app_window_views.h
index 23a6854..b0cc0ed 100644
--- a/athena/extensions/athena_native_app_window_views.h
+++ b/athena/extensions/athena_native_app_window_views.h
@@ -5,7 +5,7 @@
#ifndef ATHENA_EXTENSIONS_ATHENA_NATIVE_APP_WINDOW_VIEWS_H_
#define ATHENA_EXTENSIONS_ATHENA_NATIVE_APP_WINDOW_VIEWS_H_
-#include "components/native_app_window/native_app_window_views.h"
+#include "extensions/components/native_app_window/native_app_window_views.h"
namespace athena {
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index 044f7cf..ad1530d 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -79,7 +79,6 @@ static_library("browser") {
"//components/metrics:net",
"//components/metrics:profiler",
"//components/metrics/proto:proto",
- "//components/native_app_window",
"//components/navigation_metrics",
"//components/network_time",
"//components/omaha_query_params",
@@ -236,9 +235,6 @@ static_library("browser") {
#"browser_app_shim" TODO(GYP)
]
}
- if (!toolkit_views) {
- deps -= [ "//components/native_app_window" ]
- }
if (cld2_data_source == "component") {
sources += [
"component_updater/cld_component_installer.cc",
diff --git a/chrome/browser/chromeos/login/DEPS b/chrome/browser/chromeos/login/DEPS
index f2d9c14..41555570 100644
--- a/chrome/browser/chromeos/login/DEPS
+++ b/chrome/browser/chromeos/login/DEPS
@@ -4,8 +4,8 @@ include_rules = [
"+athena/screen/public",
"+athena/util",
"+components/captive_portal",
- "+components/native_app_window",
"+components/user_manager",
+ "+extensions/components/native_app_window",
# Library used for calculating CRC-32 needed for HWID verification.
"+third_party/zlib",
diff --git a/chrome/browser/chromeos/login/kiosk_browsertest.cc b/chrome/browser/chromeos/login/kiosk_browsertest.cc
index 1da1d8c..fde63ed 100644
--- a/chrome/browser/chromeos/login/kiosk_browsertest.cc
+++ b/chrome/browser/chromeos/login/kiosk_browsertest.cc
@@ -46,7 +46,6 @@
#include "chromeos/chromeos_switches.h"
#include "chromeos/dbus/cryptohome_client.h"
#include "chromeos/disks/disk_mount_manager.h"
-#include "components/native_app_window/native_app_window_views.h"
#include "components/signin/core/common/signin_pref_names.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_observer.h"
@@ -57,6 +56,7 @@
#include "extensions/browser/app_window/app_window_registry.h"
#include "extensions/browser/app_window/native_app_window.h"
#include "extensions/browser/extension_system.h"
+#include "extensions/components/native_app_window/native_app_window_views.h"
#include "extensions/test/extension_test_message_listener.h"
#include "extensions/test/result_catcher.h"
#include "google_apis/gaia/gaia_constants.h"
diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn
index 4c0dca5..c03e0e0 100644
--- a/chrome/browser/ui/BUILD.gn
+++ b/chrome/browser/ui/BUILD.gn
@@ -205,6 +205,7 @@ static_library("ui") {
sources += rebase_path(
gypi_values.chrome_browser_ui_views_non_mac_sources,
".", "//chrome")
+ deps += [ "//extensions/components/native_app_window" ]
}
if (use_ash) {
sources += rebase_path(gypi_values.chrome_browser_ui_ash_views_sources,
diff --git a/chrome/browser/ui/views/apps/DEPS b/chrome/browser/ui/views/apps/DEPS
index ccbb8b0..c02db09 100644
--- a/chrome/browser/ui/views/apps/DEPS
+++ b/chrome/browser/ui/views/apps/DEPS
@@ -1,3 +1,3 @@
include_rules = [
- "+components/native_app_window"
+ "+extensions/components/native_app_window"
]
diff --git a/chrome/browser/ui/views/apps/chrome_native_app_window_views.h b/chrome/browser/ui/views/apps/chrome_native_app_window_views.h
index f5d6335..ea6b812 100644
--- a/chrome/browser/ui/views/apps/chrome_native_app_window_views.h
+++ b/chrome/browser/ui/views/apps/chrome_native_app_window_views.h
@@ -6,7 +6,7 @@
#define CHROME_BROWSER_UI_VIEWS_APPS_CHROME_NATIVE_APP_WINDOW_VIEWS_H_
#include "base/memory/scoped_ptr.h"
-#include "components/native_app_window/native_app_window_views.h"
+#include "extensions/components/native_app_window/native_app_window_views.h"
#include "ui/views/context_menu_controller.h"
namespace apps {
diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi
index 1d4796c..1154360 100644
--- a/chrome/chrome_browser.gypi
+++ b/chrome/chrome_browser.gypi
@@ -3005,11 +3005,6 @@
'browser/metrics/signin_status_metrics_provider.h',
],
}],
- ['toolkit_views==1', {
- 'dependencies': [
- '../components/components.gyp:native_app_window',
- ],
- }],
['enable_extensions==1', {
'dependencies': [
'browser_extensions',
diff --git a/chrome/chrome_browser_ui.gypi b/chrome/chrome_browser_ui.gypi
index 1847cac..bda73a0 100644
--- a/chrome/chrome_browser_ui.gypi
+++ b/chrome/chrome_browser_ui.gypi
@@ -2738,6 +2738,9 @@
}],
['OS!="mac"', {
'sources': [ '<@(chrome_browser_ui_views_non_mac_sources)' ],
+ 'dependencies': [
+ '<(DEPTH)/extensions/components/extensions_components.gyp:native_app_window',
+ ],
}],
],
}],
diff --git a/components/BUILD.gn b/components/BUILD.gn
index a7eaf7f..8290ea9 100644
--- a/components/BUILD.gn
+++ b/components/BUILD.gn
@@ -51,7 +51,6 @@ group("all_components") {
"//components/language_usage_metrics",
"//components/leveldb_proto",
"//components/metrics",
- "//components/native_app_window",
"//components/navigation_interception",
"//components/navigation_metrics",
"//components/network_time",
@@ -113,10 +112,6 @@ group("all_components") {
if (!is_chromeos) {
deps -= [ "//components/pairing" ]
}
- if (!toolkit_views) {
- deps -= [ "//components/native_app_window" ]
- }
-
if (is_ios) {
deps -= [ "//components/keyed_service/content" ]
}
diff --git a/components/OWNERS b/components/OWNERS
index f8176b5..aa88043 100644
--- a/components/OWNERS
+++ b/components/OWNERS
@@ -98,10 +98,6 @@ per-file nacl*=mseaborn@chromium.org
per-file nacl*=noelallen@chromium.org
per-file nacl*=teravest@chromium.org
-per-file native_app_window*=benwells@chromium.org
-per-file native_app_window*=jackhou@chromium.org
-per-file native_app_window*=jamescook@chromium.org
-
per-file navigation_interception.gypi=mkosiba@chromium.org
per-file network_time.gypi=zea@chromium.org
diff --git a/components/components.gyp b/components/components.gyp
index e696a24..b9af219 100644
--- a/components/components.gyp
+++ b/components/components.gyp
@@ -112,11 +112,6 @@
'invalidation.gypi',
],
}],
- ['toolkit_views==1', {
- 'includes': [
- 'native_app_window.gypi',
- ],
- }],
['enable_plugins==1', {
'includes': [
'pdf.gypi',
diff --git a/components/native_app_window/DEPS b/components/native_app_window/DEPS
deleted file mode 100644
index 88293dc..0000000
--- a/components/native_app_window/DEPS
+++ /dev/null
@@ -1,10 +0,0 @@
-include_rules = [
- "+base",
- "+content/public/browser",
- "+extensions/browser/app_window",
- "+extensions/common",
- "+ui/aura",
- "+ui/gfx",
- "+ui/views",
- "+third_party/skia/include/core/SkRegion.h",
-]
diff --git a/extensions/DEPS b/extensions/DEPS
index 2286ed4..d2bbec8 100644
--- a/extensions/DEPS
+++ b/extensions/DEPS
@@ -7,6 +7,7 @@ include_rules = [
"+content/public/common",
"+content/public/test",
"+crypto",
+ "-extensions/components",
"+extensions/test",
"+grit/extensions_renderer_resources.h",
"+grit/extensions_resources.h",
diff --git a/extensions/components/DEPS b/extensions/components/DEPS
new file mode 100644
index 0000000..0a33fe4
--- /dev/null
+++ b/extensions/components/DEPS
@@ -0,0 +1,7 @@
+include_rules = [
+ # Things in extensions/components can depend on extensions, but not other
+ # extensions/components in a way that could make a cycle in the dependency
+ # graph. Individual components must explicitly declare their dependencies
+ # on other components.
+ "-extensions/components",
+]
diff --git a/extensions/components/README b/extensions/components/README
new file mode 100644
index 0000000..4f0474d
--- /dev/null
+++ b/extensions/components/README
@@ -0,0 +1,11 @@
+This directory holds components reused in multiple embedders which themselves
+have extensions dependencies. Components such as these do not belong in the root
+src/components, because src/extensions already depends on src/components. A
+component in src/components can not have an extensions dependency.
+
+Code in an extensions/component should be placed in a namespace corresponding to
+the name of the component (ignoring extensions); e.g. for a component living in
+extensions/components/foo, code in that component should be in the foo::
+namespace.
+
+See src/components/README for additional notes.
diff --git a/extensions/components/extensions_components.gyp b/extensions/components/extensions_components.gyp
new file mode 100644
index 0000000..953a2e1
--- /dev/null
+++ b/extensions/components/extensions_components.gyp
@@ -0,0 +1,19 @@
+# Copyright 2014 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.
+
+{
+ 'variables': {
+ # This turns on e.g. the filename-based detection of which
+ # platforms to include source files on (e.g. files ending in
+ # _mac.h or _mac.cc are only compiled on MacOSX).
+ 'chromium_code': 1,
+ },
+ 'conditions': [
+ ['toolkit_views==1', {
+ 'includes': [
+ 'native_app_window.gypi',
+ ],
+ }],
+ ],
+}
diff --git a/components/native_app_window.gypi b/extensions/components/native_app_window.gypi
index dd68ff6..5af1c92 100644
--- a/components/native_app_window.gypi
+++ b/extensions/components/native_app_window.gypi
@@ -7,15 +7,16 @@
'target_name': 'native_app_window',
'type': 'static_library',
'dependencies': [
- '../base/base.gyp:base',
- '../content/content.gyp:content_browser',
- '../extensions/extensions.gyp:extensions_browser',
- '../extensions/extensions.gyp:extensions_common',
- '../skia/skia.gyp:skia',
- '../ui/views/views.gyp:views',
+ '../../base/base.gyp:base',
+ '../../content/content.gyp:content_browser',
+ '../../skia/skia.gyp:skia',
+ '../../ui/views/views.gyp:views',
+ '../../ui/views/controls/webview/webview.gyp:webview',
+ '../extensions.gyp:extensions_browser',
+ '../extensions.gyp:extensions_common',
],
'include_dirs': [
- '..',
+ '../..',
],
'sources': [
'native_app_window/native_app_window_views.cc',
diff --git a/components/native_app_window/BUILD.gn b/extensions/components/native_app_window/BUILD.gn
index 0fd2a00..28330bc 100644
--- a/components/native_app_window/BUILD.gn
+++ b/extensions/components/native_app_window/BUILD.gn
@@ -12,6 +12,7 @@ static_library("native_app_window") {
"//base",
"//skia",
"//ui/views",
+ "//ui/views/controls/webview",
"//content/public/browser",
"//extensions/browser",
"//extensions/common",
diff --git a/extensions/components/native_app_window/DEPS b/extensions/components/native_app_window/DEPS
new file mode 100644
index 0000000..aa37418
--- /dev/null
+++ b/extensions/components/native_app_window/DEPS
@@ -0,0 +1,4 @@
+include_rules = [
+ "+content/public/browser",
+ "+third_party/skia/include/core/SkRegion.h",
+]
diff --git a/extensions/components/native_app_window/OWNERS b/extensions/components/native_app_window/OWNERS
new file mode 100644
index 0000000..a3b54c9
--- /dev/null
+++ b/extensions/components/native_app_window/OWNERS
@@ -0,0 +1,3 @@
+benwells@chromium.org
+jackhou@chromium.org
+jamescook@chromium.org
diff --git a/extensions/components/native_app_window/README b/extensions/components/native_app_window/README
new file mode 100644
index 0000000..bec84bb
--- /dev/null
+++ b/extensions/components/native_app_window/README
@@ -0,0 +1,2 @@
+The native_app_window extensions component contains UI-specific implementations
+of extensions::NativeAppWindow.
diff --git a/components/native_app_window/native_app_window_views.cc b/extensions/components/native_app_window/native_app_window_views.cc
index fb91682..c460527 100644
--- a/components/native_app_window/native_app_window_views.cc
+++ b/extensions/components/native_app_window/native_app_window_views.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 "components/native_app_window/native_app_window_views.h"
+#include "extensions/components/native_app_window/native_app_window_views.h"
#include "base/threading/sequenced_worker_pool.h"
#include "content/public/browser/render_view_host.h"
diff --git a/components/native_app_window/native_app_window_views.h b/extensions/components/native_app_window/native_app_window_views.h
index 0467d2d..aabf4bb 100644
--- a/components/native_app_window/native_app_window_views.h
+++ b/extensions/components/native_app_window/native_app_window_views.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 COMPONENTS_NATIVE_APP_WINDOW_NATIVE_APP_WINDOW_VIEWS_H_
-#define COMPONENTS_NATIVE_APP_WINDOW_NATIVE_APP_WINDOW_VIEWS_H_
+#ifndef EXTENSIONS_COMPONENTS_NATIVE_APP_WINDOW_NATIVE_APP_WINDOW_VIEWS_H_
+#define EXTENSIONS_COMPONENTS_NATIVE_APP_WINDOW_NATIVE_APP_WINDOW_VIEWS_H_
#include "base/observer_list.h"
#include "content/public/browser/web_contents_observer.h"
@@ -194,4 +194,4 @@ class NativeAppWindowViews : public extensions::NativeAppWindow,
} // namespace native_app_window
-#endif // COMPONENTS_NATIVE_APP_WINDOW_NATIVE_APP_WINDOW_VIEWS_H_
+#endif // EXTENSIONS_COMPONENTS_NATIVE_APP_WINDOW_NATIVE_APP_WINDOW_VIEWS_H_