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

Side by Side Diff: ash/wm/window_state.cc

Issue 303163003: ash: Fix VideoDetectorTest's WindowState usage. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test instead Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/wm/video_detector_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/wm/window_state.h" 5 #include "ash/wm/window_state.h"
6 6
7 #include "ash/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "ash/root_window_controller.h" 8 #include "ash/root_window_controller.h"
9 #include "ash/screen_util.h" 9 #include "ash/screen_util.h"
10 #include "ash/shell_window_ids.h" 10 #include "ash/shell_window_ids.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 top_row_keys_are_function_keys_(false), 91 top_row_keys_are_function_keys_(false),
92 unminimize_to_restore_bounds_(false), 92 unminimize_to_restore_bounds_(false),
93 hide_shelf_when_fullscreen_(true), 93 hide_shelf_when_fullscreen_(true),
94 minimum_visibility_(false), 94 minimum_visibility_(false),
95 can_be_dragged_(true), 95 can_be_dragged_(true),
96 ignore_property_change_(false), 96 ignore_property_change_(false),
97 current_state_(new DefaultState(ToWindowStateType(GetShowState()))) { 97 current_state_(new DefaultState(ToWindowStateType(GetShowState()))) {
98 window_->AddObserver(this); 98 window_->AddObserver(this);
99 } 99 }
100 100
101 WindowState::~WindowState() { 101 WindowState::~WindowState() {
sky 2014/05/30 02:29:13 Is it possible to make this private and friend som
102 // WindowState is registered as an owned property of |window_|, and window
103 // unregisters all of its observers in its d'tor before destroying its
104 // properties. As a result, window_->RemoveObserver() doesn't need to (and
105 // shouldn't) be called here.
102 } 106 }
103 107
104 bool WindowState::HasDelegate() const { 108 bool WindowState::HasDelegate() const {
105 return delegate_; 109 return delegate_;
106 } 110 }
107 111
108 void WindowState::SetDelegate(scoped_ptr<WindowStateDelegate> delegate) { 112 void WindowState::SetDelegate(scoped_ptr<WindowStateDelegate> delegate) {
109 DCHECK(!delegate_.get()); 113 DCHECK(!delegate_.get());
110 delegate_ = delegate.Pass(); 114 delegate_ = delegate.Pass();
111 } 115 }
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 } 449 }
446 return settings; 450 return settings;
447 } 451 }
448 452
449 const WindowState* GetWindowState(const aura::Window* window) { 453 const WindowState* GetWindowState(const aura::Window* window) {
450 return GetWindowState(const_cast<aura::Window*>(window)); 454 return GetWindowState(const_cast<aura::Window*>(window));
451 } 455 }
452 456
453 } // namespace wm 457 } // namespace wm
454 } // namespace ash 458 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/video_detector_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698