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

Unified Diff: ui/views/corewm/shadow_controller.cc

Issue 11275296: Move shadow code to views\corewm (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 1 month 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 | « ui/views/corewm/shadow_controller.h ('k') | ui/views/corewm/shadow_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/corewm/shadow_controller.cc
===================================================================
--- ui/views/corewm/shadow_controller.cc (revision 167460)
+++ ui/views/corewm/shadow_controller.cc (working copy)
@@ -2,14 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ash/wm/shadow_controller.h"
+#include "ui/views/corewm/shadow_controller.h"
#include <utility>
-#include "ash/shell.h"
-#include "ash/wm/shadow.h"
-#include "ash/wm/shadow_types.h"
-#include "ash/wm/window_properties.h"
#include "base/command_line.h"
#include "base/logging.h"
#include "ui/aura/client/activation_client.h"
@@ -17,11 +13,13 @@
#include "ui/aura/root_window.h"
#include "ui/aura/window.h"
#include "ui/compositor/layer.h"
+#include "ui/views/corewm/shadow.h"
+#include "ui/views/corewm/shadow_types.h"
using std::make_pair;
-namespace ash {
-namespace internal {
+namespace views {
+namespace corewm {
namespace {
@@ -68,17 +66,16 @@
} // namespace
-ShadowController::ShadowController()
- : ALLOW_THIS_IN_INITIALIZER_LIST(observer_manager_(this)) {
+ShadowController::ShadowController(aura::RootWindow* root_window)
+ : ALLOW_THIS_IN_INITIALIZER_LIST(observer_manager_(this)),
+ root_window_(root_window) {
aura::Env::GetInstance()->AddObserver(this);
// Watch for window activation changes.
- aura::client::GetActivationClient(Shell::GetPrimaryRootWindow())->
- AddObserver(this);
+ aura::client::GetActivationClient(root_window_)->AddObserver(this);
}
ShadowController::~ShadowController() {
- aura::client::GetActivationClient(Shell::GetPrimaryRootWindow())->
- RemoveObserver(this);
+ aura::client::GetActivationClient(root_window_)->RemoveObserver(this);
aura::Env::GetInstance()->RemoveObserver(this);
}
@@ -165,5 +162,5 @@
window->layer()->Add(shadow->layer());
}
-} // namespace internal
-} // namespace ash
+} // namespace corewm
+} // namespace views
« no previous file with comments | « ui/views/corewm/shadow_controller.h ('k') | ui/views/corewm/shadow_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698