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

Side by Side Diff: ash/wm/dock/docked_window_layout_manager.h

Issue 195793004: Implement overscroll support for the virtual keyboard. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix copyright notice. Created 6 years, 9 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #ifndef ASH_WM_DOCK_DOCKED_WINDOW_LAYOUT_MANAGER_H_ 5 #ifndef ASH_WM_DOCK_DOCKED_WINDOW_LAYOUT_MANAGER_H_
6 #define ASH_WM_DOCK_DOCKED_WINDOW_LAYOUT_MANAGER_H_ 6 #define ASH_WM_DOCK_DOCKED_WINDOW_LAYOUT_MANAGER_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "ash/shelf/shelf_layout_manager_observer.h" 9 #include "ash/shelf/shelf_layout_manager_observer.h"
10 #include "ash/shell_observer.h" 10 #include "ash/shell_observer.h"
11 #include "ash/wm/dock/dock_types.h" 11 #include "ash/wm/dock/dock_types.h"
12 #include "ash/wm/dock/docked_window_layout_manager_observer.h" 12 #include "ash/wm/dock/docked_window_layout_manager_observer.h"
13 #include "ash/wm/window_state_observer.h" 13 #include "ash/wm/window_state_observer.h"
14 #include "ash/wm/workspace/snap_types.h" 14 #include "ash/wm/workspace/snap_types.h"
15 #include "base/basictypes.h" 15 #include "base/basictypes.h"
16 #include "base/compiler_specific.h" 16 #include "base/compiler_specific.h"
17 #include "base/gtest_prod_util.h" 17 #include "base/gtest_prod_util.h"
18 #include "base/memory/scoped_ptr.h" 18 #include "base/memory/scoped_ptr.h"
19 #include "base/observer_list.h" 19 #include "base/observer_list.h"
20 #include "base/time/time.h" 20 #include "base/time/time.h"
21 #include "ui/aura/client/virtual_keyboard_observer.h"
21 #include "ui/aura/layout_manager.h" 22 #include "ui/aura/layout_manager.h"
22 #include "ui/aura/window.h" 23 #include "ui/aura/window.h"
23 #include "ui/aura/window_observer.h" 24 #include "ui/aura/window_observer.h"
24 #include "ui/gfx/rect.h" 25 #include "ui/gfx/rect.h"
25 #include "ui/keyboard/keyboard_controller_observer.h"
26 #include "ui/wm/public/activation_change_observer.h" 26 #include "ui/wm/public/activation_change_observer.h"
27 27
28 namespace aura { 28 namespace aura {
29 class Window; 29 class Window;
30 } 30 }
31 31
32 namespace gfx { 32 namespace gfx {
33 class Point; 33 class Point;
34 } 34 }
35 35
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 // dock_container->SetLayoutManager( 67 // dock_container->SetLayoutManager(
68 // new DockedWindowLayoutManager(dock_container)); 68 // new DockedWindowLayoutManager(dock_container));
69 // 69 //
70 // TODO(varkha): extend BaseLayoutManager instead of LayoutManager to inherit 70 // TODO(varkha): extend BaseLayoutManager instead of LayoutManager to inherit
71 // common functionality. 71 // common functionality.
72 class ASH_EXPORT DockedWindowLayoutManager 72 class ASH_EXPORT DockedWindowLayoutManager
73 : public aura::LayoutManager, 73 : public aura::LayoutManager,
74 public ash::ShellObserver, 74 public ash::ShellObserver,
75 public aura::WindowObserver, 75 public aura::WindowObserver,
76 public aura::client::ActivationChangeObserver, 76 public aura::client::ActivationChangeObserver,
77 public keyboard::KeyboardControllerObserver, 77 public aura::client::VirtualKeyboardObserver,
78 public ShelfLayoutManagerObserver, 78 public ShelfLayoutManagerObserver,
79 public wm::WindowStateObserver { 79 public wm::WindowStateObserver {
80 public: 80 public:
81 // Maximum width of the docked windows area. 81 // Maximum width of the docked windows area.
82 static const int kMaxDockWidth; 82 static const int kMaxDockWidth;
83 83
84 // Minimum width of the docked windows area. 84 // Minimum width of the docked windows area.
85 static const int kMinDockWidth; 85 static const int kMinDockWidth;
86 86
87 DockedWindowLayoutManager(aura::Window* dock_container, 87 DockedWindowLayoutManager(aura::Window* dock_container,
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 241
242 // Updates |docked_bounds_| and workspace insets when bounds of docked windows 242 // Updates |docked_bounds_| and workspace insets when bounds of docked windows
243 // area change. Passing |reason| to observers allows selectively skipping 243 // area change. Passing |reason| to observers allows selectively skipping
244 // notifications. 244 // notifications.
245 void UpdateDockBounds(DockedWindowLayoutManagerObserver::Reason reason); 245 void UpdateDockBounds(DockedWindowLayoutManagerObserver::Reason reason);
246 246
247 // Called whenever the window stacking order needs to be updated (e.g. focus 247 // Called whenever the window stacking order needs to be updated (e.g. focus
248 // changes or a window is moved). 248 // changes or a window is moved).
249 void UpdateStacking(aura::Window* active_window); 249 void UpdateStacking(aura::Window* active_window);
250 250
251 // keyboard::KeyboardControllerObserver: 251 // aura::client::VirtualKeyboardObserver:
252 virtual void OnKeyboardBoundsChanging( 252 virtual void OnKeyboardBoundsChanging(
253 const gfx::Rect& keyboard_bounds) OVERRIDE; 253 const gfx::Rect& keyboard_bounds) OVERRIDE;
254 254
255 // Parent window associated with this layout manager. 255 // Parent window associated with this layout manager.
256 aura::Window* dock_container_; 256 aura::Window* dock_container_;
257 // Protect against recursive calls to Relayout(). 257 // Protect against recursive calls to Relayout().
258 bool in_layout_; 258 bool in_layout_;
259 259
260 // A window that is being dragged (whether docked or not). 260 // A window that is being dragged (whether docked or not).
261 // Windows are tracked by docked layout manager only if they are docked; 261 // Windows are tracked by docked layout manager only if they are docked;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 // Observers of dock bounds changes. 307 // Observers of dock bounds changes.
308 ObserverList<DockedWindowLayoutManagerObserver> observer_list_; 308 ObserverList<DockedWindowLayoutManagerObserver> observer_list_;
309 309
310 DISALLOW_COPY_AND_ASSIGN(DockedWindowLayoutManager); 310 DISALLOW_COPY_AND_ASSIGN(DockedWindowLayoutManager);
311 }; 311 };
312 312
313 } // namespace internal 313 } // namespace internal
314 } // namespace ash 314 } // namespace ash
315 315
316 #endif // ASH_WM_DOCK_DOCKED_WINDOW_LAYOUT_MANAGER_H_ 316 #endif // ASH_WM_DOCK_DOCKED_WINDOW_LAYOUT_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698