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

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

Issue 121153003: Prevents panels attached to shelf from docking (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Prevents panels attached to shelf from docking (nits) Created 6 years, 11 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
« no previous file with comments | « ash/wm/window_state.h ('k') | ash/wm/workspace/multi_window_resize_controller.cc » ('j') | 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_ash.h" 9 #include "ash/screen_ash.h"
10 #include "ash/shell_window_ids.h" 10 #include "ash/shell_window_ids.h"
(...skipping 15 matching lines...) Expand all
26 26
27 WindowState::WindowState(aura::Window* window) 27 WindowState::WindowState(aura::Window* window)
28 : window_(window), 28 : window_(window),
29 window_position_managed_(false), 29 window_position_managed_(false),
30 bounds_changed_by_user_(false), 30 bounds_changed_by_user_(false),
31 panel_attached_(true), 31 panel_attached_(true),
32 continue_drag_after_reparent_(false), 32 continue_drag_after_reparent_(false),
33 ignored_by_shelf_(false), 33 ignored_by_shelf_(false),
34 can_consume_system_keys_(false), 34 can_consume_system_keys_(false),
35 top_row_keys_are_function_keys_(false), 35 top_row_keys_are_function_keys_(false),
36 window_resizer_(NULL),
37 always_restores_to_restore_bounds_(false), 36 always_restores_to_restore_bounds_(false),
38 hide_shelf_when_fullscreen_(true), 37 hide_shelf_when_fullscreen_(true),
39 animate_to_fullscreen_(true), 38 animate_to_fullscreen_(true),
40 minimum_visibility_(false), 39 minimum_visibility_(false),
41 in_set_window_show_type_(false), 40 in_set_window_show_type_(false),
42 window_show_type_(ToWindowShowType(GetShowState())) { 41 window_show_type_(ToWindowShowType(GetShowState())) {
43 window_->AddObserver(this); 42 window_->AddObserver(this);
44 43
45 #if defined(OS_CHROMEOS) 44 #if defined(OS_CHROMEOS)
46 // NOTE(pkotwicz): Animating to immersive fullscreen does not look good. When 45 // NOTE(pkotwicz): Animating to immersive fullscreen does not look good. When
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 } 244 }
246 245
247 void WindowState::AddObserver(WindowStateObserver* observer) { 246 void WindowState::AddObserver(WindowStateObserver* observer) {
248 observer_list_.AddObserver(observer); 247 observer_list_.AddObserver(observer);
249 } 248 }
250 249
251 void WindowState::RemoveObserver(WindowStateObserver* observer) { 250 void WindowState::RemoveObserver(WindowStateObserver* observer) {
252 observer_list_.RemoveObserver(observer); 251 observer_list_.RemoveObserver(observer);
253 } 252 }
254 253
254 bool WindowState::CreateDragDetails(aura::Window* window,
255 const gfx::Point& point_in_parent,
256 int window_component,
257 aura::client::WindowMoveSource source) {
258 scoped_ptr<DragDetails> details(new DragDetails(
259 window, point_in_parent, window_component, source));
260 if (!details->is_resizable)
261 return false;
262 drag_details_ = details.Pass();
263 return true;
264 }
265
266 void WindowState::DeleteDragDetails() {
267 drag_details_.reset();
268 }
269
255 void WindowState::OnWindowPropertyChanged(aura::Window* window, 270 void WindowState::OnWindowPropertyChanged(aura::Window* window,
256 const void* key, 271 const void* key,
257 intptr_t old) { 272 intptr_t old) {
258 DCHECK_EQ(window, window_); 273 DCHECK_EQ(window, window_);
259 if (key == aura::client::kShowStateKey) 274 if (key == aura::client::kShowStateKey)
260 SetWindowShowType(ToWindowShowType(GetShowState())); 275 SetWindowShowType(ToWindowShowType(GetShowState()));
261 } 276 }
262 277
263 void WindowState::SnapWindow(WindowShowType left_or_right, 278 void WindowState::SnapWindow(WindowShowType left_or_right,
264 const gfx::Rect& bounds) { 279 const gfx::Rect& bounds) {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 } 338 }
324 return settings; 339 return settings;
325 } 340 }
326 341
327 const WindowState* GetWindowState(const aura::Window* window) { 342 const WindowState* GetWindowState(const aura::Window* window) {
328 return GetWindowState(const_cast<aura::Window*>(window)); 343 return GetWindowState(const_cast<aura::Window*>(window));
329 } 344 }
330 345
331 } // namespace wm 346 } // namespace wm
332 } // namespace ash 347 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/window_state.h ('k') | ash/wm/workspace/multi_window_resize_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698