diff options
author | derat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-10 20:53:27 +0000 |
---|---|---|
committer | derat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-10 20:53:27 +0000 |
commit | 17eae598cc52d3cd95597c07dc35469369c59010 (patch) | |
tree | d8819cf216863ddcf94928ae647ab566016c7b71 | |
parent | 4b2f65784504669a14cf7d93a9b97bcc81ab62a3 (diff) | |
download | chromium_src-17eae598cc52d3cd95597c07dc35469369c59010.zip chromium_src-17eae598cc52d3cd95597c07dc35469369c59010.tar.gz chromium_src-17eae598cc52d3cd95597c07dc35469369c59010.tar.bz2 |
Move MinimalShell to ui/shell.
Move the MinimalShell class from content to a new "shell"
library so it can be shared by app_shell. Also move
aura::test::TestActivationClient to
aura::client::DefaultActivationClient.
BUG=305404
Review URL: https://codereview.chromium.org/26699003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227986 0039d316-1c4b-4281-b951-d872f2087c98
25 files changed, 127 insertions, 82 deletions
diff --git a/apps/apps.gypi b/apps/apps.gypi index baf0379..74ff723 100644 --- a/apps/apps.gypi +++ b/apps/apps.gypi @@ -107,6 +107,7 @@ '../content/content.gyp:content', '../content/content.gyp:content_shell_lib', '../skia/skia.gyp:skia', + '../ui/shell/shell.gyp:shell', '../ui/views/views.gyp:views', ], 'include_dirs': [ diff --git a/apps/shell/DEPS b/apps/shell/DEPS index d4570d3..8e3a902 100644 --- a/apps/shell/DEPS +++ b/apps/shell/DEPS @@ -1,9 +1,9 @@ include_rules = [ "-chrome", + "+ui/shell", # Pieces of content_shell reused in app_shell. # TODO(jamescook): Remove these. http://crbug.com/305404 - "+content/shell/browser/minimal_shell.h", "+content/shell/browser/shell_browser_context.h", "+content/shell/common/shell_content_client.h", ] diff --git a/apps/shell/app_shell_browser_main_parts.cc b/apps/shell/app_shell_browser_main_parts.cc index db08a5a..c56918d 100644 --- a/apps/shell/app_shell_browser_main_parts.cc +++ b/apps/shell/app_shell_browser_main_parts.cc @@ -7,11 +7,11 @@ #include "apps/shell/web_view_window.h" #include "base/run_loop.h" #include "content/public/common/result_codes.h" -#include "content/shell/browser/minimal_shell.h" #include "content/shell/browser/shell_browser_context.h" #include "ui/aura/env.h" #include "ui/aura/root_window.h" #include "ui/aura/test/test_screen.h" +#include "ui/shell/minimal_shell.h" namespace apps { @@ -42,7 +42,7 @@ void AppShellBrowserMainParts::PreMainMessageLoopRun() { gfx::Screen::SetScreenInstance( gfx::SCREEN_TYPE_NATIVE, aura::TestScreen::Create()); // Set up basic pieces of views::corewm. - minimal_shell_.reset(new content::MinimalShell(gfx::Size(800, 600))); + minimal_shell_.reset(new shell::MinimalShell(gfx::Size(800, 600))); // Ensure the X window gets mapped. minimal_shell_->root_window()->ShowRootWindow(); diff --git a/apps/shell/app_shell_browser_main_parts.h b/apps/shell/app_shell_browser_main_parts.h index 8bde9e3..bcbfa8f 100644 --- a/apps/shell/app_shell_browser_main_parts.h +++ b/apps/shell/app_shell_browser_main_parts.h @@ -13,6 +13,9 @@ namespace content { class ShellBrowserContext; struct MainFunctionParams; +} + +namespace shell { class MinimalShell; } @@ -45,7 +48,7 @@ class AppShellBrowserMainParts : public content::BrowserMainParts { scoped_ptr<content::ShellBrowserContext> browser_context_; // Enable a minimal set of views::corewm to be initialized. - scoped_ptr<content::MinimalShell> minimal_shell_; + scoped_ptr<shell::MinimalShell> minimal_shell_; DISALLOW_COPY_AND_ASSIGN(AppShellBrowserMainParts); }; diff --git a/ash/wm/toplevel_window_event_handler_unittest.cc b/ash/wm/toplevel_window_event_handler_unittest.cc index 42ee673..40acb41 100644 --- a/ash/wm/toplevel_window_event_handler_unittest.cc +++ b/ash/wm/toplevel_window_event_handler_unittest.cc @@ -23,7 +23,6 @@ #include "ui/aura/root_window.h" #include "ui/aura/test/aura_test_base.h" #include "ui/aura/test/event_generator.h" -#include "ui/aura/test/test_activation_client.h" #include "ui/aura/test/test_window_delegate.h" #include "ui/base/hit_test.h" #include "ui/events/event.h" diff --git a/content/content_shell.gypi b/content/content_shell.gypi index 6485682..efd102f 100644 --- a/content/content_shell.gypi +++ b/content/content_shell.gypi @@ -77,8 +77,6 @@ 'shell/app/webkit_test_platform_support_linux.cc', 'shell/app/webkit_test_platform_support_mac.mm', 'shell/app/webkit_test_platform_support_win.cc', - 'shell/browser/minimal_shell.cc', - 'shell/browser/minimal_shell.h', 'shell/browser/notify_done_forwarder.cc', 'shell/browser/notify_done_forwarder.h', 'shell/browser/shell_android.cc', @@ -233,6 +231,7 @@ ['chromeos==1', { 'dependencies': [ '../chromeos/chromeos.gyp:chromeos', + '../ui/shell/shell.gyp:shell', ], }], # chromeos==1 ['use_ash==1', { diff --git a/content/shell/DEPS b/content/shell/DEPS index 5385a5d..cd6dea8 100644 --- a/content/shell/DEPS +++ b/content/shell/DEPS @@ -23,3 +23,9 @@ include_rules = [ # For WebTestRunner library "+third_party/WebKit/public/testing", ] + +specific_include_rules = { + "shell_aura\.cc": [ + "+ui/shell" + ], +} diff --git a/content/shell/browser/shell.h b/content/shell/browser/shell.h index 29cbaa7..86c4497 100644 --- a/content/shell/browser/shell.h +++ b/content/shell/browser/shell.h @@ -26,15 +26,15 @@ typedef struct _GtkToolItem GtkToolItem; #include "base/android/scoped_java_ref.h" #elif defined(USE_AURA) #if defined(OS_CHROMEOS) -namespace content { +namespace shell { class MinimalShell; -} -#endif +} // namespace shell +#endif // defined(OS_CHROMEOS) namespace views { class Widget; class ViewsDelegate; -} -#endif +} // namespace views +#endif // defined(USE_AURA) class GURL; namespace content { @@ -252,7 +252,7 @@ class Shell : public WebContentsDelegate, base::android::ScopedJavaGlobalRef<jobject> java_object_; #elif defined(USE_AURA) #if defined(OS_CHROMEOS) - static content::MinimalShell* minimal_shell_; + static shell::MinimalShell* minimal_shell_; #endif static views::ViewsDelegate* views_delegate_; diff --git a/content/shell/browser/shell_aura.cc b/content/shell/browser/shell_aura.cc index da8460e..7d8309a 100644 --- a/content/shell/browser/shell_aura.cc +++ b/content/shell/browser/shell_aura.cc @@ -30,8 +30,8 @@ #if defined(OS_CHROMEOS) #include "chromeos/dbus/dbus_thread_manager.h" -#include "content/shell/browser/minimal_shell.h" #include "ui/aura/test/test_screen.h" +#include "ui/shell/minimal_shell.h" #endif #if defined(OS_WIN) @@ -278,7 +278,7 @@ class ShellWindowDelegateView : public views::WidgetDelegateView, } // namespace #if defined(OS_CHROMEOS) -MinimalShell* Shell::minimal_shell_ = NULL; +shell::MinimalShell* Shell::minimal_shell_ = NULL; #endif views::ViewsDelegate* Shell::views_delegate_ = NULL; @@ -292,7 +292,7 @@ void Shell::PlatformInitialize(const gfx::Size& default_window_size) { chromeos::DBusThreadManager::Initialize(); gfx::Screen::SetScreenInstance( gfx::SCREEN_TYPE_NATIVE, aura::TestScreen::Create()); - minimal_shell_ = new content::MinimalShell(default_window_size); + minimal_shell_ = new shell::MinimalShell(default_window_size); #else gfx::Screen::SetScreenInstance( gfx::SCREEN_TYPE_NATIVE, views::CreateDesktopScreen()); diff --git a/ui/aura/aura.gyp b/ui/aura/aura.gyp index af6aa7b..539a115 100644 --- a/ui/aura/aura.gyp +++ b/ui/aura/aura.gyp @@ -44,6 +44,8 @@ 'client/cursor_client.h', 'client/cursor_client_observer.h', 'client/cursor_client_observer.cc', + 'client/default_activation_client.cc', + 'client/default_activation_client.h', 'client/default_capture_client.cc', 'client/default_capture_client.h', 'client/dispatcher_client.cc', @@ -143,8 +145,6 @@ 'test/aura_test_helper.h', 'test/event_generator.cc', 'test/event_generator.h', - 'test/test_activation_client.cc', - 'test/test_activation_client.h', 'test/test_aura_initializer.cc', 'test/test_aura_initializer.h', 'test/test_cursor_client.cc', diff --git a/ui/aura/test/test_activation_client.cc b/ui/aura/client/default_activation_client.cc index 14f6b30..84ff282 100644 --- a/ui/aura/test/test_activation_client.cc +++ b/ui/aura/client/default_activation_client.cc @@ -1,8 +1,8 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright 2013 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. -#include "ui/aura/test/test_activation_client.h" +#include "ui/aura/client/default_activation_client.h" #include "ui/aura/client/activation_change_observer.h" #include "ui/aura/client/activation_delegate.h" @@ -10,36 +10,36 @@ #include "ui/aura/window.h" namespace aura { -namespace test { +namespace client { //////////////////////////////////////////////////////////////////////////////// -// TestActivationClient, public: +// DefaultActivationClient, public: -TestActivationClient::TestActivationClient(RootWindow* root_window) +DefaultActivationClient::DefaultActivationClient(RootWindow* root_window) : last_active_(NULL) { client::SetActivationClient(root_window, this); } -TestActivationClient::~TestActivationClient() { +DefaultActivationClient::~DefaultActivationClient() { for (unsigned int i = 0; i < active_windows_.size(); ++i) { active_windows_[i]->RemoveObserver(this); } } //////////////////////////////////////////////////////////////////////////////// -// TestActivationClient, client::ActivationClient implementation: +// DefaultActivationClient, client::ActivationClient implementation: -void TestActivationClient::AddObserver( +void DefaultActivationClient::AddObserver( client::ActivationChangeObserver* observer) { observers_.AddObserver(observer); } -void TestActivationClient::RemoveObserver( +void DefaultActivationClient::RemoveObserver( client::ActivationChangeObserver* observer) { observers_.RemoveObserver(observer); } -void TestActivationClient::ActivateWindow(Window* window) { +void DefaultActivationClient::ActivateWindow(Window* window) { Window* last_active = GetActiveWindow(); if (last_active == window) return; @@ -63,7 +63,7 @@ void TestActivationClient::ActivateWindow(Window* window) { observer->OnWindowActivated(window, last_active); } -void TestActivationClient::DeactivateWindow(Window* window) { +void DefaultActivationClient::DeactivateWindow(Window* window) { aura::client::ActivationChangeObserver* observer = aura::client::GetActivationChangeObserver(window); if (observer) @@ -72,33 +72,33 @@ void TestActivationClient::DeactivateWindow(Window* window) { ActivateWindow(last_active_); } -Window* TestActivationClient::GetActiveWindow() { +Window* DefaultActivationClient::GetActiveWindow() { if (active_windows_.empty()) return NULL; return active_windows_.back(); } -Window* TestActivationClient::GetActivatableWindow(Window* window) { +Window* DefaultActivationClient::GetActivatableWindow(Window* window) { return NULL; } -Window* TestActivationClient::GetToplevelWindow(Window* window) { +Window* DefaultActivationClient::GetToplevelWindow(Window* window) { return NULL; } -bool TestActivationClient::OnWillFocusWindow(Window* window, - const ui::Event* event) { +bool DefaultActivationClient::OnWillFocusWindow(Window* window, + const ui::Event* event) { return true; } -bool TestActivationClient::CanActivateWindow(Window* window) const { +bool DefaultActivationClient::CanActivateWindow(Window* window) const { return true; } //////////////////////////////////////////////////////////////////////////////// -// TestActivationClient, WindowObserver implementation: +// DefaultActivationClient, WindowObserver implementation: -void TestActivationClient::OnWindowDestroyed(Window* window) { +void DefaultActivationClient::OnWindowDestroyed(Window* window) { if (window == last_active_) last_active_ = NULL; @@ -116,7 +116,7 @@ void TestActivationClient::OnWindowDestroyed(Window* window) { RemoveActiveWindow(window); } -void TestActivationClient::RemoveActiveWindow(Window* window) { +void DefaultActivationClient::RemoveActiveWindow(Window* window) { for (unsigned int i = 0; i < active_windows_.size(); ++i) { if (active_windows_[i] == window) { active_windows_.erase(active_windows_.begin() + i); @@ -126,5 +126,5 @@ void TestActivationClient::RemoveActiveWindow(Window* window) { } } -} // namespace test +} // namespace client } // namespace aura diff --git a/ui/aura/test/test_activation_client.h b/ui/aura/client/default_activation_client.h index e5eb397..ebf04aa 100644 --- a/ui/aura/test/test_activation_client.h +++ b/ui/aura/client/default_activation_client.h @@ -1,12 +1,13 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright 2013 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. -#ifndef UI_AURA_TEST_TEST_ACTIVATION_CLIENT_H_ -#define UI_AURA_TEST_TEST_ACTIVATION_CLIENT_H_ +#ifndef UI_AURA_CLIENT_DEFAULT_ACTIVATION_CLIENT_H_ +#define UI_AURA_CLIENT_DEFAULT_ACTIVATION_CLIENT_H_ #include "base/compiler_specific.h" #include "base/logging.h" +#include "ui/aura/aura_export.h" #include "ui/aura/client/activation_client.h" #include "ui/aura/window_observer.h" @@ -16,13 +17,16 @@ namespace client { class ActivationChangeObserver; } -namespace test { +namespace client { -class TestActivationClient : public client::ActivationClient, - public WindowObserver { +// Simple ActivationClient implementation for use by tests and other targets +// that just need basic behavior (e.g. activate windows whenever requested, +// restack windows at the top when they're activated, etc.). +class AURA_EXPORT DefaultActivationClient : public client::ActivationClient, + public WindowObserver { public: - explicit TestActivationClient(RootWindow* root_window); - virtual ~TestActivationClient(); + explicit DefaultActivationClient(RootWindow* root_window); + virtual ~DefaultActivationClient(); // Overridden from client::ActivationClient: virtual void AddObserver(client::ActivationChangeObserver* observer) OVERRIDE; @@ -54,10 +58,10 @@ class TestActivationClient : public client::ActivationClient, ObserverList<client::ActivationChangeObserver> observers_; - DISALLOW_COPY_AND_ASSIGN(TestActivationClient); + DISALLOW_COPY_AND_ASSIGN(DefaultActivationClient); }; -} // namespace test +} // namespace client } // namespace aura -#endif // UI_AURA_TEST_TEST_ACTIVATION_CLIENT_H_ +#endif // UI_AURA_CLIENT_DEFAULT_ACTIVATION_CLIENT_H_ diff --git a/ui/aura/test/aura_test_helper.cc b/ui/aura/test/aura_test_helper.cc index 6cd9d68..5309514 100644 --- a/ui/aura/test/aura_test_helper.cc +++ b/ui/aura/test/aura_test_helper.cc @@ -7,12 +7,12 @@ #include "base/message_loop/message_loop.h" #include "base/run_loop.h" #include "ui/aura/client/aura_constants.h" +#include "ui/aura/client/default_activation_client.h" #include "ui/aura/client/default_capture_client.h" #include "ui/aura/client/focus_client.h" #include "ui/aura/env.h" #include "ui/aura/focus_manager.h" #include "ui/aura/root_window.h" -#include "ui/aura/test/test_activation_client.h" #include "ui/aura/test/test_screen.h" #include "ui/aura/test/test_stacking_client.h" #include "ui/base/ime/dummy_input_method.h" @@ -73,8 +73,8 @@ void AuraTestHelper::SetUp() { focus_client_.reset(new FocusManager); client::SetFocusClient(root_window_.get(), focus_client_.get()); stacking_client_.reset(new TestStackingClient(root_window_.get())); - test_activation_client_.reset( - new test::TestActivationClient(root_window_.get())); + activation_client_.reset( + new client::DefaultActivationClient(root_window_.get())); capture_client_.reset(new client::DefaultCaptureClient(root_window_.get())); test_input_method_.reset(new ui::DummyInputMethod); root_window_->SetProperty( @@ -90,7 +90,7 @@ void AuraTestHelper::TearDown() { teardown_called_ = true; test_input_method_.reset(); stacking_client_.reset(); - test_activation_client_.reset(); + activation_client_.reset(); capture_client_.reset(); focus_client_.reset(); root_window_.reset(); diff --git a/ui/aura/test/aura_test_helper.h b/ui/aura/test/aura_test_helper.h index 9973dbd..02f9c31 100644 --- a/ui/aura/test/aura_test_helper.h +++ b/ui/aura/test/aura_test_helper.h @@ -25,11 +25,11 @@ namespace aura { class RootWindow; class TestScreen; namespace client { +class DefaultActivationClient; class DefaultCaptureClient; class FocusClient; } namespace test { -class TestActivationClient; class TestStackingClient; // A helper class owned by tests that does common initialization required for @@ -61,7 +61,7 @@ class AuraTestHelper { bool owns_root_window_; scoped_ptr<RootWindow> root_window_; scoped_ptr<TestStackingClient> stacking_client_; - scoped_ptr<TestActivationClient> test_activation_client_; + scoped_ptr<client::DefaultActivationClient> activation_client_; scoped_ptr<client::DefaultCaptureClient> capture_client_; scoped_ptr<ui::InputMethod> test_input_method_; scoped_ptr<client::FocusClient> focus_client_; diff --git a/ui/shell/DEPS b/ui/shell/DEPS new file mode 100644 index 0000000..78adcc9 --- /dev/null +++ b/ui/shell/DEPS @@ -0,0 +1,4 @@ +include_rules = [ + "+ui/aura", + "+ui/views", +] diff --git a/ui/shell/README.chromium b/ui/shell/README.chromium new file mode 100644 index 0000000..9678777 --- /dev/null +++ b/ui/shell/README.chromium @@ -0,0 +1,2 @@ +This directory contains a minimal shell implementation built using Aura and +Views. diff --git a/content/shell/browser/minimal_shell.cc b/ui/shell/minimal_shell.cc index cc719db..9c3ca11 100644 --- a/content/shell/browser/minimal_shell.cc +++ b/ui/shell/minimal_shell.cc @@ -2,17 +2,17 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "content/shell/browser/minimal_shell.h" +#include "ui/shell/minimal_shell.h" +#include "ui/aura/client/default_activation_client.h" #include "ui/aura/client/default_capture_client.h" #include "ui/aura/env.h" #include "ui/aura/focus_manager.h" #include "ui/aura/root_window.h" -#include "ui/aura/test/test_activation_client.h" #include "ui/views/corewm/compound_event_filter.h" #include "ui/views/corewm/input_method_event_filter.h" -namespace content { +namespace shell { MinimalShell::MinimalShell(const gfx::Size& default_window_size) { aura::Env::CreateInstance(); @@ -35,8 +35,8 @@ MinimalShell::MinimalShell(const gfx::Size& default_window_size) { root_window_.get()); root_window_event_filter_->AddHandler(input_method_filter_.get()); - test_activation_client_.reset( - new aura::test::TestActivationClient(root_window_.get())); + activation_client_.reset( + new aura::client::DefaultActivationClient(root_window_.get())); capture_client_.reset( new aura::client::DefaultCaptureClient(root_window_.get())); @@ -53,4 +53,4 @@ aura::Window* MinimalShell::GetDefaultParent( return root_window_.get(); } -} // namespace content +} // namespace shell diff --git a/content/shell/browser/minimal_shell.h b/ui/shell/minimal_shell.h index e316fe0..f8ae67b 100644 --- a/content/shell/browser/minimal_shell.h +++ b/ui/shell/minimal_shell.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 CONTENT_SHELL_BROWSER_MINIMAL_SHELL_H_ -#define CONTENT_SHELL_BROWSER_MINIMAL_SHELL_H_ +#ifndef UI_SHELL_MINIMAL_SHELL_H_ +#define UI_SHELL_MINIMAL_SHELL_H_ #include "base/compiler_specific.h" #include "base/memory/scoped_ptr.h" @@ -13,27 +13,25 @@ namespace aura { class RootWindow; class Window; namespace client { +class DefaultActivationClient; class DefaultCaptureClient; class FocusClient; -} -namespace test { -class TestActivationClient; -} -} +} // class client +} // class aura namespace gfx { class Rect; class Size; -} +} // class gfx namespace views { namespace corewm { class CompoundEventFilter; class InputMethodEventFilter; -} -} +} // corewm +} // views -namespace content { +namespace shell { // Creates a minimal environment for running the shell. We can't pull in all of // ash here, but we can create attach several of the same things we'd find in @@ -58,12 +56,12 @@ class MinimalShell : public aura::client::StackingClient { scoped_ptr<aura::client::DefaultCaptureClient> capture_client_; scoped_ptr<views::corewm::InputMethodEventFilter> input_method_filter_; - scoped_ptr<aura::test::TestActivationClient> test_activation_client_; + scoped_ptr<aura::client::DefaultActivationClient> activation_client_; scoped_ptr<aura::client::FocusClient> focus_client_; DISALLOW_COPY_AND_ASSIGN(MinimalShell); }; -} // namespace content; +} // namespace shell -#endif // CONTENT_SHELL_BROWSER_MINIMAL_SHELL_H_ +#endif // UI_SHELL_MINIMAL_SHELL_H_ diff --git a/ui/shell/shell.gyp b/ui/shell/shell.gyp new file mode 100644 index 0000000..7c5c595 --- /dev/null +++ b/ui/shell/shell.gyp @@ -0,0 +1,21 @@ +# Copyright 2013 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. + +{ + 'targets': [ + { + 'target_name': 'shell', + 'type': 'static_library', + 'dependencies': [ + '../aura/aura.gyp:aura', + '../views/views.gyp:views', + '../../skia/skia.gyp:skia', + ], + 'sources': [ + 'minimal_shell.cc', + 'minimal_shell.h', + ], + }, + ], +} diff --git a/ui/views/DEPS b/ui/views/DEPS index 483d4c0..80e217e 100644 --- a/ui/views/DEPS +++ b/ui/views/DEPS @@ -11,3 +11,9 @@ include_rules = [ "+ui/gfx", "+ui/native_theme", ] + +specific_include_rules = { + "examples_browser_main_parts\.cc": [ + "+ui/shell" + ], +} diff --git a/ui/views/corewm/compound_event_filter_unittest.cc b/ui/views/corewm/compound_event_filter_unittest.cc index 75ff9f46..11e7d6c 100644 --- a/ui/views/corewm/compound_event_filter_unittest.cc +++ b/ui/views/corewm/compound_event_filter_unittest.cc @@ -10,7 +10,6 @@ #include "ui/aura/root_window.h" #include "ui/aura/test/aura_test_base.h" #include "ui/aura/test/event_generator.h" -#include "ui/aura/test/test_activation_client.h" #include "ui/aura/test/test_cursor_client.h" #include "ui/aura/test/test_windows.h" #include "ui/events/event.h" diff --git a/ui/views/corewm/input_method_event_filter_unittest.cc b/ui/views/corewm/input_method_event_filter_unittest.cc index a5927ab..76cabfa 100644 --- a/ui/views/corewm/input_method_event_filter_unittest.cc +++ b/ui/views/corewm/input_method_event_filter_unittest.cc @@ -12,7 +12,6 @@ #include "ui/aura/test/aura_test_base.h" #include "ui/aura/test/event_generator.h" #include "ui/aura/test/test_event_handler.h" -#include "ui/aura/test/test_activation_client.h" #include "ui/aura/test/test_windows.h" #if !defined(OS_WIN) && !defined(USE_X11) diff --git a/ui/views/examples/content_client/examples_browser_main_parts.cc b/ui/views/examples/content_client/examples_browser_main_parts.cc index 42ef2b8..9a16191 100644 --- a/ui/views/examples/content_client/examples_browser_main_parts.cc +++ b/ui/views/examples/content_client/examples_browser_main_parts.cc @@ -26,9 +26,9 @@ #endif #if defined(OS_CHROMEOS) -#include "content/shell/browser/minimal_shell.h" #include "ui/aura/root_window.h" #include "ui/aura/test/test_screen.h" +#include "ui/shell/minimal_shell.h" #endif namespace views { @@ -49,7 +49,7 @@ void ExamplesBrowserMainParts::PreMainMessageLoopRun() { gfx::Screen::SetScreenInstance( gfx::SCREEN_TYPE_NATIVE, aura::TestScreen::Create()); // Set up basic pieces of views::corewm. - minimal_shell_.reset(new content::MinimalShell(gfx::Size(800, 600))); + minimal_shell_.reset(new shell::MinimalShell(gfx::Size(800, 600))); // Ensure the X window gets mapped. minimal_shell_->root_window()->ShowRootWindow(); // Ensure Aura knows where to open new windows. diff --git a/ui/views/examples/content_client/examples_browser_main_parts.h b/ui/views/examples/content_client/examples_browser_main_parts.h index ef7eb05..f272ff8 100644 --- a/ui/views/examples/content_client/examples_browser_main_parts.h +++ b/ui/views/examples/content_client/examples_browser_main_parts.h @@ -10,11 +10,14 @@ #include "content/public/browser/browser_main_parts.h" namespace content { -class MinimalShell; class ShellBrowserContext; struct MainFunctionParams; } +namespace shell { +class MinimalShell; +} + namespace views { class ViewsDelegate; @@ -42,7 +45,7 @@ class ExamplesBrowserMainParts : public content::BrowserMainParts { #if defined(OS_CHROMEOS) // Enable a minimal set of views::corewm to be initialized. - scoped_ptr<content::MinimalShell> minimal_shell_; + scoped_ptr<shell::MinimalShell> minimal_shell_; #endif DISALLOW_COPY_AND_ASSIGN(ExamplesBrowserMainParts); diff --git a/ui/views/views.gyp b/ui/views/views.gyp index fcdade3..f701848 100644 --- a/ui/views/views.gyp +++ b/ui/views/views.gyp @@ -1036,6 +1036,7 @@ '../../third_party/icu/icu.gyp:icuuc', '../events/events.gyp:events', '../gfx/gfx.gyp:gfx', + '../shell/shell.gyp:shell', '../ui.gyp:ui', '../ui.gyp:ui_resources', 'views', |