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

Side by Side Diff: ash/wm/workspace/workspace_layout_manager.h

Issue 313463002: Prevent a11y on-screen keyboard from occluding active text field. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_H_ 5 #ifndef ASH_WM_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_H_
6 #define ASH_WM_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_H_ 6 #define ASH_WM_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "ash/ash_export.h" 10 #include "ash/ash_export.h"
11 #include "ash/shell_observer.h" 11 #include "ash/shell_observer.h"
12 #include "ash/wm/window_state_observer.h" 12 #include "ash/wm/window_state_observer.h"
13 #include "ash/wm/wm_types.h" 13 #include "ash/wm/wm_types.h"
14 #include "base/basictypes.h" 14 #include "base/basictypes.h"
15 #include "base/compiler_specific.h" 15 #include "base/compiler_specific.h"
16 #include "base/memory/scoped_ptr.h" 16 #include "base/memory/scoped_ptr.h"
17 #include "ui/aura/layout_manager.h" 17 #include "ui/aura/layout_manager.h"
18 #include "ui/aura/window_observer.h" 18 #include "ui/aura/window_observer.h"
19 #include "ui/gfx/rect.h" 19 #include "ui/gfx/rect.h"
20 #include "ui/keyboard/keyboard_controller_observer.h"
20 #include "ui/wm/public/activation_change_observer.h" 21 #include "ui/wm/public/activation_change_observer.h"
21 22
22 namespace aura { 23 namespace aura {
23 class RootWindow; 24 class RootWindow;
24 class Window; 25 class Window;
25 } 26 }
26 27
27 namespace ui { 28 namespace ui {
28 class Layer; 29 class Layer;
29 } 30 }
30 31
31 namespace ash { 32 namespace ash {
32 class ShelfLayoutManager; 33 class ShelfLayoutManager;
33 class WorkspaceLayoutManagerDelegate; 34 class WorkspaceLayoutManagerDelegate;
34 35
35 namespace wm { 36 namespace wm {
36 class WindowState; 37 class WindowState;
37 class WMEvent; 38 class WMEvent;
38 } 39 }
39 40
40 // LayoutManager used on the window created for a workspace. 41 // LayoutManager used on the window created for a workspace.
41 class ASH_EXPORT WorkspaceLayoutManager 42 class ASH_EXPORT WorkspaceLayoutManager
42 : public aura::LayoutManager, 43 : public aura::LayoutManager,
43 public aura::WindowObserver, 44 public aura::WindowObserver,
44 public aura::client::ActivationChangeObserver, 45 public aura::client::ActivationChangeObserver,
46 public keyboard::KeyboardControllerObserver,
45 public ShellObserver, 47 public ShellObserver,
46 public wm::WindowStateObserver { 48 public wm::WindowStateObserver {
47 public: 49 public:
48 explicit WorkspaceLayoutManager(aura::Window* window); 50 explicit WorkspaceLayoutManager(aura::Window* window);
49 virtual ~WorkspaceLayoutManager(); 51 virtual ~WorkspaceLayoutManager();
50 52
51 void SetShelf(ShelfLayoutManager* shelf); 53 void SetShelf(ShelfLayoutManager* shelf);
52 54
53 // A delegate which can be set to add a backdrop behind the top most visible 55 // A delegate which can be set to add a backdrop behind the top most visible
54 // window. With the call the ownership of the delegate will be transferred to 56 // window. With the call the ownership of the delegate will be transferred to
(...skipping 23 matching lines...) Expand all
78 virtual void OnWindowStackingChanged(aura::Window* window) OVERRIDE; 80 virtual void OnWindowStackingChanged(aura::Window* window) OVERRIDE;
79 virtual void OnWindowDestroying(aura::Window* window) OVERRIDE; 81 virtual void OnWindowDestroying(aura::Window* window) OVERRIDE;
80 virtual void OnWindowBoundsChanged(aura::Window* window, 82 virtual void OnWindowBoundsChanged(aura::Window* window,
81 const gfx::Rect& old_bounds, 83 const gfx::Rect& old_bounds,
82 const gfx::Rect& new_bounds) OVERRIDE; 84 const gfx::Rect& new_bounds) OVERRIDE;
83 85
84 // aura::client::ActivationChangeObserver overrides: 86 // aura::client::ActivationChangeObserver overrides:
85 virtual void OnWindowActivated(aura::Window* gained_active, 87 virtual void OnWindowActivated(aura::Window* gained_active,
86 aura::Window* lost_active) OVERRIDE; 88 aura::Window* lost_active) OVERRIDE;
87 89
90 // keyboard::KeyboardControllerObserver overrides:
91 virtual void OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) OVERRIDE;
92
88 // WindowStateObserver overrides: 93 // WindowStateObserver overrides:
89 virtual void OnPostWindowStateTypeChange( 94 virtual void OnPostWindowStateTypeChange(
90 wm::WindowState* window_state, 95 wm::WindowState* window_state,
91 wm::WindowStateType old_type) OVERRIDE; 96 wm::WindowStateType old_type) OVERRIDE;
92 97
93 private: 98 private:
94 typedef std::set<aura::Window*> WindowSet; 99 typedef std::set<aura::Window*> WindowSet;
95 100
96 // Adjusts the bounds of all managed windows when the display area changes. 101 // Adjusts the bounds of all managed windows when the display area changes.
97 // This happens when the display size, work area insets has changed. 102 // This happens when the display size, work area insets has changed.
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 // A window which covers the full container and which gets inserted behind the 142 // A window which covers the full container and which gets inserted behind the
138 // topmost visible window. 143 // topmost visible window.
139 scoped_ptr<WorkspaceLayoutManagerDelegate> backdrop_delegate_; 144 scoped_ptr<WorkspaceLayoutManagerDelegate> backdrop_delegate_;
140 145
141 DISALLOW_COPY_AND_ASSIGN(WorkspaceLayoutManager); 146 DISALLOW_COPY_AND_ASSIGN(WorkspaceLayoutManager);
142 }; 147 };
143 148
144 } // namespace ash 149 } // namespace ash
145 150
146 #endif // ASH_WM_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_H_ 151 #endif // ASH_WM_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698