diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-12 17:49:27 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-12 17:49:27 +0000 |
commit | 7721b8d8e5d2ca2044b40e11c783af918f2b3013 (patch) | |
tree | 907ad174397f6ead3d79d982414881db28c80ddd /ui | |
parent | 47f73c9ede1ed4998ee4d291417433fe73bff017 (diff) | |
download | chromium_src-7721b8d8e5d2ca2044b40e11c783af918f2b3013.zip chromium_src-7721b8d8e5d2ca2044b40e11c783af918f2b3013.tar.gz chromium_src-7721b8d8e5d2ca2044b40e11c783af918f2b3013.tar.bz2 |
Remove a bunch of stuff related to Focus/Activation events.
http://crbug.com/162100
R=sadrul@chromium.org
Review URL: https://codereview.chromium.org/11537019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172624 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r-- | ui/views/controls/menu/menu_controller_aura.cc | 11 | ||||
-rw-r--r-- | ui/views/corewm/activation_change_shim.cc | 41 | ||||
-rw-r--r-- | ui/views/corewm/activation_change_shim.h | 48 | ||||
-rw-r--r-- | ui/views/corewm/focus_change_event.cc | 64 | ||||
-rw-r--r-- | ui/views/corewm/focus_change_event.h | 86 | ||||
-rw-r--r-- | ui/views/corewm/focus_change_shim.cc | 39 | ||||
-rw-r--r-- | ui/views/corewm/focus_change_shim.h | 48 | ||||
-rw-r--r-- | ui/views/corewm/focus_controller.cc | 1 | ||||
-rw-r--r-- | ui/views/corewm/focus_controller.h | 4 | ||||
-rw-r--r-- | ui/views/corewm/focus_controller_unittest.cc | 1 | ||||
-rw-r--r-- | ui/views/corewm/shadow_controller.cc | 23 | ||||
-rw-r--r-- | ui/views/corewm/shadow_controller.h | 10 | ||||
-rw-r--r-- | ui/views/views.gyp | 6 | ||||
-rw-r--r-- | ui/views/widget/native_widget_aura_window_observer.cc | 10 | ||||
-rw-r--r-- | ui/views/widget/native_widget_aura_window_observer.h | 8 |
15 files changed, 32 insertions, 368 deletions
diff --git a/ui/views/controls/menu/menu_controller_aura.cc b/ui/views/controls/menu/menu_controller_aura.cc index d5c6295..3051903 100644 --- a/ui/views/controls/menu/menu_controller_aura.cc +++ b/ui/views/controls/menu/menu_controller_aura.cc @@ -5,13 +5,13 @@ #include "ui/views/controls/menu/menu_controller.h" #include "base/run_loop.h" +#include "ui/aura/client/activation_change_observer.h" #include "ui/aura/client/activation_client.h" #include "ui/aura/client/dispatcher_client.h" #include "ui/aura/client/drag_drop_client.h" #include "ui/aura/root_window.h" #include "ui/aura/window_observer.h" #include "ui/gfx/screen.h" -#include "ui/views/corewm/activation_change_shim.h" #include "ui/views/widget/widget.h" namespace views { @@ -22,13 +22,12 @@ namespace { // the menu. Additionally it listens for the root window to be destroyed and // cancel the menu as well. class ActivationChangeObserverImpl - : public corewm::ActivationChangeShim, + : public aura::client::ActivationChangeObserver, public aura::WindowObserver { public: ActivationChangeObserverImpl(MenuController* controller, aura::RootWindow* root) - : ActivationChangeShim(root), - controller_(controller), + : controller_(controller), root_(root) { aura::client::GetActivationClient(root_)->AddObserver(this); root_->AddObserver(this); @@ -39,8 +38,8 @@ class ActivationChangeObserverImpl } // aura::client::ActivationChangeObserver overrides: - virtual void OnWindowActivated(aura::Window* active, - aura::Window* old_active) OVERRIDE { + virtual void OnWindowActivated(aura::Window* gained_active, + aura::Window* lost_active) OVERRIDE { if (!controller_->drag_in_progress()) controller_->CancelAll(); } diff --git a/ui/views/corewm/activation_change_shim.cc b/ui/views/corewm/activation_change_shim.cc deleted file mode 100644 index 97c8b82..0000000 --- a/ui/views/corewm/activation_change_shim.cc +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2012 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/views/corewm/activation_change_shim.h" - -#include "ui/aura/window.h" -#include "ui/base/events/event_target.h" -#include "ui/views/corewm/corewm_switches.h" -#include "ui/views/corewm/focus_change_event.h" - -namespace views { -namespace corewm { - -ActivationChangeShim::ActivationChangeShim(ui::EventTarget* target) - : target_(target) { - if (UseFocusController() && target_) - target_->AddPreTargetHandler(this); -} - -ActivationChangeShim::~ActivationChangeShim() { - if (UseFocusController() && target_) - target_->RemovePreTargetHandler(this); -} - -void ActivationChangeShim::OnWindowActivated(aura::Window* active, - aura::Window* old_active) { -} - -void ActivationChangeShim::OnEvent(ui::Event* event) { - if (event->type() == FocusChangeEvent::activation_changed_event_type()) { - DCHECK(UseFocusController()); - FocusChangeEvent* fce = static_cast<FocusChangeEvent*>(event); - OnWindowActivated(static_cast<aura::Window*>(event->target()), - static_cast<aura::Window*>(fce->last_focus())); - } - EventHandler::OnEvent(event); -} - -} // namespace corewm -} // namespace views diff --git a/ui/views/corewm/activation_change_shim.h b/ui/views/corewm/activation_change_shim.h deleted file mode 100644 index 77bed97..0000000 --- a/ui/views/corewm/activation_change_shim.h +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2012 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_VIEWS_COREWM_ACTIVATION_CHANGE_SHIM_ -#define UI_VIEWS_COREWM_ACTIVATION_CHANGE_SHIM_ - -#include "base/basictypes.h" -#include "base/compiler_specific.h" -#include "ui/aura/client/activation_change_observer.h" -#include "ui/base/events/event_handler.h" -#include "ui/views/corewm/focus_change_event.h" -#include "ui/views/views_export.h" - -namespace ui { -class EventTarget; -} - -namespace views { -namespace corewm { - -// A class that converts FocusChangeEvents to calls to an -// ActivationChangeObserver. An interim bandaid that allows us to incrementally -// convert observers to use the new FocusController. -class VIEWS_EXPORT ActivationChangeShim - : public aura::client::ActivationChangeObserver, - public ui::EventHandler { - protected: - explicit ActivationChangeShim(ui::EventTarget* target); - virtual ~ActivationChangeShim(); - - // Overridden from aura::client::ActivationChangeObserver: - virtual void OnWindowActivated(aura::Window* active, - aura::Window* old_active) OVERRIDE; - - // Overridden from ui::EventHandler: - virtual void OnEvent(ui::Event* event) OVERRIDE; - - private: - ui::EventTarget* target_; - - DISALLOW_COPY_AND_ASSIGN(ActivationChangeShim); -}; - -} // namespace corewm -} // namespace views - -#endif // UI_VIEWS_COREWM_ACTIVATION_CHANGE_SHIM_ diff --git a/ui/views/corewm/focus_change_event.cc b/ui/views/corewm/focus_change_event.cc deleted file mode 100644 index 90a943e..0000000 --- a/ui/views/corewm/focus_change_event.cc +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2012 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/views/corewm/focus_change_event.h" - -#include "base/time.h" -#include "ui/base/events/event_utils.h" - -namespace views { -namespace corewm { - -namespace { - -std::string FocusChangeEventName(int type) { - if (type == FocusChangeEvent::focus_changing_event_type()) - return "FOCUS_CHANGING"; - if (type == FocusChangeEvent::focus_changed_event_type()) - return "FOCUS_CHANGED"; - if (type == FocusChangeEvent::activation_changing_event_type()) - return "ACTIVATION_CHANGING"; - if (type == FocusChangeEvent::activation_changed_event_type()) - return "ACTIVATION_CHANGED"; - NOTREACHED(); - return std::string(); -} - -} // namespace - -// static -int FocusChangeEvent::focus_changing_event_type_ = ui::ET_UNKNOWN; -int FocusChangeEvent::focus_changed_event_type_ = ui::ET_UNKNOWN; -int FocusChangeEvent::activation_changing_event_type_ = ui::ET_UNKNOWN; -int FocusChangeEvent::activation_changed_event_type_ = ui::ET_UNKNOWN; - -FocusChangeEvent::FocusChangeEvent(int type) - : Event(static_cast<ui::EventType>(type), - base::TimeDelta::FromMilliseconds(base::Time::Now().ToDoubleT()), - 0), - last_focus_(NULL) { - DCHECK_NE(type, ui::ET_UNKNOWN) << - "Call RegisterEventTypes() before instantiating this class"; - set_cancelable(false); - set_dispatch_to_hidden_targets(true); - set_name(FocusChangeEventName(type)); -} - -FocusChangeEvent::~FocusChangeEvent() { -} - -// static -void FocusChangeEvent::RegisterEventTypes() { - static bool registered = false; - if (!registered) { - registered = true; - focus_changing_event_type_ = ui::RegisterCustomEventType(); - focus_changed_event_type_ = ui::RegisterCustomEventType(); - activation_changing_event_type_ = ui::RegisterCustomEventType(); - activation_changed_event_type_ = ui::RegisterCustomEventType(); - } -} - -} // namespace corewm -} // namespace views diff --git a/ui/views/corewm/focus_change_event.h b/ui/views/corewm/focus_change_event.h deleted file mode 100644 index 8222bae..0000000 --- a/ui/views/corewm/focus_change_event.h +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) 2012 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_VIEWS_COREWM_FOCUS_CHANGE_EVENT_H_ -#define UI_VIEWS_COREWM_FOCUS_CHANGE_EVENT_H_ - -#include "ui/base/events/event.h" -#include "ui/base/events/event_target.h" -#include "ui/views/views_export.h" - -namespace views { -namespace corewm { - -// FocusChangeEvent notifies a change in focus or activation state. -// Focus refers to the target that can receive key events. -// Activation is the key "top level window" as defined by the window management -// scheme in use. -// Focus and activation are closely related, and the rules governing their -// change are numerous and complex. The implementation of the dispatch of this -// event is handled by the FocusController. See that class and its unit tests -// for specifics. -class VIEWS_EXPORT FocusChangeEvent : public ui::Event { - public: - // An API used by the code in FocusController that dispatches - // FocusChangeEvents. - class DispatcherApi : public ui::Event::DispatcherApi { - public: - explicit DispatcherApi(FocusChangeEvent* event) - : ui::Event::DispatcherApi(event), event_(event) {} - - void set_last_focus(ui::EventTarget* last_focus) { - event_->last_focus_ = last_focus; - } - - private: - FocusChangeEvent* event_; - - DISALLOW_COPY_AND_ASSIGN(DispatcherApi); - }; - - // |type| is one of the possible FocusChangeEvent types registered by calling - // RegisterEventTypes() before instantiating this class. See below. - explicit FocusChangeEvent(int type); - virtual ~FocusChangeEvent(); - - // Must be called before instantiating this class. - static void RegisterEventTypes(); - - // -ing events are sent when focus or activation is about to be changed. This - // gives the target and its pre- and post- handlers the ability to abort the - // or re-target the change before the FocusController makes it. - static int focus_changing_event_type() { return focus_changing_event_type_; } - static int activation_changing_event_type() { - return activation_changing_event_type_; - } - - // -ed events are sent when focus or activation has been changed in the - // FocusController. It is possible to stop propagation of this event but that - // only affects handlers downstream from being notified of the change already - // made in the FocusController. - static int focus_changed_event_type() { return focus_changed_event_type_; } - static int activation_changed_event_type() { - return activation_changed_event_type_; - } - - ui::EventTarget* last_focus() { return last_focus_; } - - private: - FocusChangeEvent(); - - // The EventTarget that had focus or activation prior to this event. - ui::EventTarget* last_focus_; - - static int focus_changing_event_type_; - static int focus_changed_event_type_; - static int activation_changing_event_type_; - static int activation_changed_event_type_; - - DISALLOW_COPY_AND_ASSIGN(FocusChangeEvent); -}; - -} // namespace corewm -} // namespace views - -#endif // UI_VIEWS_COREWM_FOCUS_CHANGE_EVENT_H_ diff --git a/ui/views/corewm/focus_change_shim.cc b/ui/views/corewm/focus_change_shim.cc deleted file mode 100644 index 6db643d..0000000 --- a/ui/views/corewm/focus_change_shim.cc +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2012 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/views/corewm/focus_change_shim.h" - -#include "ui/aura/window.h" -#include "ui/base/events/event_target.h" -#include "ui/views/corewm/corewm_switches.h" -#include "ui/views/corewm/focus_change_event.h" - -namespace views { -namespace corewm { - -FocusChangeShim::FocusChangeShim(ui::EventTarget* target) - : target_(target) { - if (views::corewm::UseFocusController() && target_) - target_->AddPreTargetHandler(this); -} - -FocusChangeShim::~FocusChangeShim() { - if (views::corewm::UseFocusController() && target_) - target_->RemovePreTargetHandler(this); -} - -void FocusChangeShim::OnWindowFocused(aura::Window* gained_focus, - aura::Window* lost_focus) { -} - -void FocusChangeShim::OnEvent(ui::Event* event) { - if (event->type() == FocusChangeEvent::focus_changed_event_type()) { - DCHECK(views::corewm::UseFocusController()); - OnWindowFocused(static_cast<aura::Window*>(event->target()), NULL); - } - EventHandler::OnEvent(event); -} - -} // namespace corewm -} // namespace views diff --git a/ui/views/corewm/focus_change_shim.h b/ui/views/corewm/focus_change_shim.h deleted file mode 100644 index 1f0f496..0000000 --- a/ui/views/corewm/focus_change_shim.h +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2012 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_VIEWS_COREWM_FOCUS_CHANGE_SHIM_ -#define UI_VIEWS_COREWM_FOCUS_CHANGE_SHIM_ - -#include "base/basictypes.h" -#include "base/compiler_specific.h" -#include "ui/aura/client/focus_change_observer.h" -#include "ui/base/events/event_handler.h" -#include "ui/views/corewm/focus_change_event.h" -#include "ui/views/views_export.h" - -namespace ui { -class EventTarget; -} - -namespace views { -namespace corewm { - -// A class that converts FocusChangeEvents to calls to an -// FocusChangeObserver. An interim bandaid that allows us to incrementally -// convert observers to use the new FocusController. -class VIEWS_EXPORT FocusChangeShim - : public aura::client::FocusChangeObserver, - public ui::EventHandler { - protected: - explicit FocusChangeShim(ui::EventTarget* target); - virtual ~FocusChangeShim(); - - // Overridden from aura::client::FocusChangeObserver: - virtual void OnWindowFocused(aura::Window* gained_focus, - aura::Window* lost_focus) OVERRIDE; - - // Overridden from ui::EventHandler: - virtual void OnEvent(ui::Event* event) OVERRIDE; - - private: - ui::EventTarget* target_; - - DISALLOW_COPY_AND_ASSIGN(FocusChangeShim); -}; - -} // namespace corewm -} // namespace views - -#endif // UI_VIEWS_COREWM_FOCUS_CHANGE_SHIM_ diff --git a/ui/views/corewm/focus_controller.cc b/ui/views/corewm/focus_controller.cc index 41d6c61..088f837 100644 --- a/ui/views/corewm/focus_controller.cc +++ b/ui/views/corewm/focus_controller.cc @@ -9,6 +9,7 @@ #include "ui/aura/client/aura_constants.h" #include "ui/aura/client/focus_change_observer.h" #include "ui/aura/env.h" +#include "ui/base/events/event.h" #include "ui/views/corewm/focus_rules.h" namespace views { diff --git a/ui/views/corewm/focus_controller.h b/ui/views/corewm/focus_controller.h index f799d62..780ee15 100644 --- a/ui/views/corewm/focus_controller.h +++ b/ui/views/corewm/focus_controller.h @@ -11,7 +11,6 @@ #include "ui/aura/client/focus_client.h" #include "ui/aura/env_observer.h" #include "ui/aura/window_observer.h" -#include "ui/base/events/event_dispatcher.h" #include "ui/views/views_export.h" namespace views { @@ -22,7 +21,8 @@ class FocusRules; // FocusController handles focus and activation changes for an environment // encompassing one or more RootWindows. Within an environment there can be // only one focused and one active window at a time. When focus or activation -// changes a FocusChangeEvent is dispatched. +// changes notifications are sent using the +// aura::client::Focus/ActivationChangeObserver interfaces. // Changes to focus and activation can be from three sources: // . the Aura Client API (implemented here in aura::client::ActivationClient). // (The FocusController must be set as the ActivationClient implementation diff --git a/ui/views/corewm/focus_controller_unittest.cc b/ui/views/corewm/focus_controller_unittest.cc index 3ca5c21..a74346d 100644 --- a/ui/views/corewm/focus_controller_unittest.cc +++ b/ui/views/corewm/focus_controller_unittest.cc @@ -18,7 +18,6 @@ #include "ui/aura/window_tracker.h" #include "ui/base/events/event_handler.h" #include "ui/views/corewm/base_focus_rules.h" -#include "ui/views/corewm/focus_change_event.h" namespace views { namespace corewm { diff --git a/ui/views/corewm/shadow_controller.cc b/ui/views/corewm/shadow_controller.cc index 0c587b3..5ab2106 100644 --- a/ui/views/corewm/shadow_controller.cc +++ b/ui/views/corewm/shadow_controller.cc @@ -67,8 +67,7 @@ Shadow::Style GetShadowStyleForWindowLosingActive( } // namespace ShadowController::ShadowController(aura::RootWindow* root_window) - : ActivationChangeShim(root_window), - ALLOW_THIS_IN_INITIALIZER_LIST(observer_manager_(this)), + : ALLOW_THIS_IN_INITIALIZER_LIST(observer_manager_(this)), root_window_(root_window) { aura::Env::GetInstance()->AddObserver(this); // Watch for window activation changes. @@ -108,18 +107,18 @@ void ShadowController::OnWindowDestroyed(aura::Window* window) { observer_manager_.Remove(window); } -void ShadowController::OnWindowActivated(aura::Window* gaining_active, - aura::Window* losing_active) { - if (gaining_active) { - Shadow* shadow = GetShadowForWindow(gaining_active); - if (shadow && !ShouldUseSmallShadowForWindow(gaining_active)) +void ShadowController::OnWindowActivated(aura::Window* gained_active, + aura::Window* lost_active) { + if (gained_active) { + Shadow* shadow = GetShadowForWindow(gained_active); + if (shadow && !ShouldUseSmallShadowForWindow(gained_active)) shadow->SetStyle(Shadow::STYLE_ACTIVE); } - if (losing_active) { - Shadow* shadow = GetShadowForWindow(losing_active); - if (shadow && !ShouldUseSmallShadowForWindow(losing_active)) { - shadow->SetStyle(GetShadowStyleForWindowLosingActive(losing_active, - gaining_active)); + if (lost_active) { + Shadow* shadow = GetShadowForWindow(lost_active); + if (shadow && !ShouldUseSmallShadowForWindow(lost_active)) { + shadow->SetStyle(GetShadowStyleForWindowLosingActive(lost_active, + gained_active)); } } } diff --git a/ui/views/corewm/shadow_controller.h b/ui/views/corewm/shadow_controller.h index 8c8bd72..68381fc 100644 --- a/ui/views/corewm/shadow_controller.h +++ b/ui/views/corewm/shadow_controller.h @@ -11,9 +11,9 @@ #include "base/compiler_specific.h" #include "base/memory/linked_ptr.h" #include "base/scoped_observer.h" +#include "ui/aura/client/activation_change_observer.h" #include "ui/aura/env_observer.h" #include "ui/aura/window_observer.h" -#include "ui/views/corewm/activation_change_shim.h" #include "ui/views/views_export.h" namespace aura { @@ -34,7 +34,7 @@ class Shadow; class VIEWS_EXPORT ShadowController : public aura::EnvObserver, public aura::WindowObserver, - public ActivationChangeShim { + public aura::client::ActivationChangeObserver { public: class TestApi { public: @@ -66,9 +66,9 @@ class VIEWS_EXPORT ShadowController : const gfx::Rect& new_bounds) OVERRIDE; virtual void OnWindowDestroyed(aura::Window* window) OVERRIDE; - // ActivationChangeShim overrides: - virtual void OnWindowActivated(aura::Window* active, - aura::Window* old_active) OVERRIDE; + // aura::client::ActivationChangeObserver overrides: + virtual void OnWindowActivated(aura::Window* gained_active, + aura::Window* lost_active) OVERRIDE; private: typedef std::map<aura::Window*, linked_ptr<Shadow> > WindowShadowMap; diff --git a/ui/views/views.gyp b/ui/views/views.gyp index 38f72cc..adbe911 100644 --- a/ui/views/views.gyp +++ b/ui/views/views.gyp @@ -237,18 +237,12 @@ 'controls/tree/tree_view_views.h', 'controls/tree/tree_view_win.cc', 'controls/tree/tree_view_win.h', - 'corewm/activation_change_shim.cc', - 'corewm/activation_change_shim.h', 'corewm/base_focus_rules.cc', 'corewm/base_focus_rules.h', 'corewm/compound_event_filter.cc', 'corewm/compound_event_filter.h', 'corewm/corewm_switches.cc', 'corewm/corewm_switches.h', - 'corewm/focus_change_event.cc', - 'corewm/focus_change_event.h', - 'corewm/focus_change_shim.cc', - 'corewm/focus_change_shim.h', 'corewm/focus_controller.cc', 'corewm/focus_controller.h', 'corewm/focus_rules.h', diff --git a/ui/views/widget/native_widget_aura_window_observer.cc b/ui/views/widget/native_widget_aura_window_observer.cc index dc101b4..3be33dd 100644 --- a/ui/views/widget/native_widget_aura_window_observer.cc +++ b/ui/views/widget/native_widget_aura_window_observer.cc @@ -13,8 +13,7 @@ namespace views { NativeWidgetAuraWindowObserver::NativeWidgetAuraWindowObserver( gfx::NativeView native_view, internal::NativeWidgetDelegate* delegate) - : ActivationChangeShim(native_view->GetRootWindow()), - native_view_(native_view), + : native_view_(native_view), delegate_(delegate) { native_view_->GetRootWindow()->AddObserver(this); native_view_->AddObserver(this); @@ -27,11 +26,10 @@ NativeWidgetAuraWindowObserver::~NativeWidgetAuraWindowObserver() { } void NativeWidgetAuraWindowObserver::OnWindowActivated( - aura::Window* active, - aura::Window* old_active) { - if (!active || active->transient_parent() != native_view_) { + aura::Window* gained_active, + aura::Window* lost_active) { + if (!gained_active || gained_active->transient_parent() != native_view_) delegate_->EnableInactiveRendering(); - } } void NativeWidgetAuraWindowObserver::OnWindowRemovingFromRootWindow( diff --git a/ui/views/widget/native_widget_aura_window_observer.h b/ui/views/widget/native_widget_aura_window_observer.h index 380a7fb..70a6037 100644 --- a/ui/views/widget/native_widget_aura_window_observer.h +++ b/ui/views/widget/native_widget_aura_window_observer.h @@ -6,9 +6,9 @@ #define UI_VIEWS_WIDGET_NATIVE_WIDGET_AURA_WINDOW_OBSERVER_H_ #include "base/compiler_specific.h" +#include "ui/aura/client/activation_change_observer.h" #include "ui/aura/window_observer.h" #include "ui/gfx/native_widget_types.h" -#include "ui/views/corewm/activation_change_shim.h" #include "ui/views/widget/native_widget_private.h" namespace views { @@ -18,7 +18,7 @@ namespace views { // changes in such a way that we should enable inactive rendering. class NativeWidgetAuraWindowObserver : public aura::WindowObserver, - public corewm::ActivationChangeShim { + public aura::client::ActivationChangeObserver { public: explicit NativeWidgetAuraWindowObserver( gfx::NativeView native_view, @@ -26,8 +26,8 @@ class NativeWidgetAuraWindowObserver virtual ~NativeWidgetAuraWindowObserver(); // Overridden from aura::client::ActivationChangeObserver: - virtual void OnWindowActivated(aura::Window* active, - aura::Window* old_active) OVERRIDE; + virtual void OnWindowActivated(aura::Window* gained_active, + aura::Window* lost_active) OVERRIDE; // Overridden from aura::WindowObserver: virtual void OnWindowRemovingFromRootWindow(aura::Window* window) OVERRIDE; |