Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3029)

Unified Diff: athena/wm/window_manager_impl.cc

Issue 455543004: Use ShadowController instead of creating its own. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « athena/home/home_card_impl.cc ('k') | athena/wm/window_overview_mode.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/wm/window_manager_impl.cc
diff --git a/athena/wm/window_manager_impl.cc b/athena/wm/window_manager_impl.cc
index f6488e395c14a5790d898a6e001444a2116d5300..47e49b64584e8948dc8408d24f1f17a7e993b4bd 100644
--- a/athena/wm/window_manager_impl.cc
+++ b/athena/wm/window_manager_impl.cc
@@ -19,8 +19,10 @@
#include "base/observer_list.h"
#include "ui/aura/layout_manager.h"
#include "ui/aura/window.h"
+#include "ui/wm/core/shadow_controller.h"
#include "ui/wm/core/window_util.h"
#include "ui/wm/core/wm_state.h"
+#include "ui/wm/public/activation_client.h"
#include "ui/wm/public/window_types.h"
namespace athena {
@@ -44,7 +46,7 @@ class WindowManagerImpl : public WindowManager,
private:
enum Command {
- COMMAND_TOGGLE_OVERVIEW,
+ CMD_TOGGLE_OVERVIEW,
};
// Sets whether overview mode is active.
@@ -84,6 +86,7 @@ class WindowManagerImpl : public WindowManager,
scoped_ptr<SplitViewController> split_view_controller_;
scoped_ptr<wm::WMState> wm_state_;
scoped_ptr<TitleDragController> title_drag_controller_;
+ scoped_ptr<wm::ShadowController> shadow_controller_;
DISALLOW_COPY_AND_ASSIGN(WindowManagerImpl);
};
@@ -123,6 +126,9 @@ WindowManagerImpl::WindowManagerImpl() {
container_->AddPreTargetHandler(bezel_controller_.get());
title_drag_controller_.reset(new TitleDragController(container_.get(), this));
wm_state_.reset(new wm::WMState());
+ aura::client::ActivationClient* activation_client =
+ aura::client::GetActivationClient(container_->GetRootWindow());
+ shadow_controller_.reset(new wm::ShadowController(activation_client));
instance = this;
InstallAccelerators();
}
@@ -185,7 +191,7 @@ void WindowManagerImpl::SetInOverview(bool active) {
void WindowManagerImpl::InstallAccelerators() {
const AcceleratorData accelerator_data[] = {
- {TRIGGER_ON_PRESS, ui::VKEY_F6, ui::EF_NONE, COMMAND_TOGGLE_OVERVIEW,
+ {TRIGGER_ON_PRESS, ui::VKEY_F6, ui::EF_NONE, CMD_TOGGLE_OVERVIEW,
AF_NONE},
};
AcceleratorManager::Get()->RegisterAccelerators(
@@ -223,7 +229,7 @@ bool WindowManagerImpl::IsCommandEnabled(int command_id) const {
bool WindowManagerImpl::OnAcceleratorFired(int command_id,
const ui::Accelerator& accelerator) {
switch (command_id) {
- case COMMAND_TOGGLE_OVERVIEW:
+ case CMD_TOGGLE_OVERVIEW:
ToggleOverview();
break;
}
« no previous file with comments | « athena/home/home_card_impl.cc ('k') | athena/wm/window_overview_mode.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698