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

Unified Diff: ash/wm/window_state_aura.cc

Issue 1943603002: Makes ash/wm/common a library (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix gyp Created 4 years, 8 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
Index: ash/wm/window_state_aura.cc
diff --git a/ash/wm/window_state_aura.cc b/ash/wm/window_state_aura.cc
index 9bd2b3a993cd4a9538541dd85d9cdf696480c091..da677ae901ea45eb9eba19834d02cd958457d249 100644
--- a/ash/wm/window_state_aura.cc
+++ b/ash/wm/window_state_aura.cc
@@ -12,6 +12,18 @@
namespace ash {
namespace wm {
+namespace {
+
+class WindowStateAura : public wm::WindowState {
James Cook 2016/05/03 18:43:10 Maybe comment on why this has to be here? At first
sky 2016/05/03 19:10:06 Yep. Added comment.
+ public:
+ explicit WindowStateAura(WmWindow* window) : wm::WindowState(window) {}
+ ~WindowStateAura() override {}
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(WindowStateAura);
+};
+
+} // namespace
WindowState* GetActiveWindowState() {
aura::Window* active = GetActiveWindow();
@@ -23,7 +35,7 @@ WindowState* GetWindowState(aura::Window* window) {
return nullptr;
WindowState* settings = window->GetProperty(kWindowStateKey);
if (!settings) {
- settings = new WindowState(WmWindowAura::Get(window));
+ settings = new WindowStateAura(WmWindowAura::Get(window));
window->SetProperty(kWindowStateKey, settings);
}
return settings;

Powered by Google App Engine
This is Rietveld 408576698