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

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

Issue 1888733002: Revert of Only create DockedBackgroundWidget as needed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « no previous file | ash/wm/dock/docked_window_layout_manager.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 (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 <memory> 8 #include <memory>
9 9
10 #include "ash/ash_export.h" 10 #include "ash/ash_export.h"
11 #include "ash/shelf/shelf_layout_manager_observer.h"
11 #include "ash/shell_observer.h" 12 #include "ash/shell_observer.h"
12 #include "ash/snap_to_pixel_layout_manager.h" 13 #include "ash/snap_to_pixel_layout_manager.h"
13 #include "ash/wm/dock/dock_types.h" 14 #include "ash/wm/dock/dock_types.h"
14 #include "ash/wm/dock/docked_window_layout_manager_observer.h" 15 #include "ash/wm/dock/docked_window_layout_manager_observer.h"
15 #include "ash/wm/window_state_observer.h" 16 #include "ash/wm/window_state_observer.h"
16 #include "base/compiler_specific.h" 17 #include "base/compiler_specific.h"
17 #include "base/macros.h" 18 #include "base/macros.h"
18 #include "base/observer_list.h" 19 #include "base/observer_list.h"
19 #include "base/time/time.h" 20 #include "base/time/time.h"
20 #include "ui/aura/window.h" 21 #include "ui/aura/window.h"
(...skipping 12 matching lines...) Expand all
33 34
34 namespace views { 35 namespace views {
35 class Widget; 36 class Widget;
36 } 37 }
37 38
38 namespace ash { 39 namespace ash {
39 class DockedBackgroundWidget; 40 class DockedBackgroundWidget;
40 class DockedWindowLayoutManagerObserver; 41 class DockedWindowLayoutManagerObserver;
41 class DockedWindowResizerTest; 42 class DockedWindowResizerTest;
42 class Shelf; 43 class Shelf;
44 class ShelfLayoutManager;
43 class WorkspaceController; 45 class WorkspaceController;
44 46
45 struct WindowWithHeight { 47 struct WindowWithHeight {
46 explicit WindowWithHeight(aura::Window* window) : 48 explicit WindowWithHeight(aura::Window* window) :
47 window_(window), 49 window_(window),
48 height_(window->bounds().height()) { } 50 height_(window->bounds().height()) { }
49 aura::Window* window() { return window_; } 51 aura::Window* window() { return window_; }
50 const aura::Window* window() const { return window_; } 52 const aura::Window* window() const { return window_; }
51 aura::Window* window_; 53 aura::Window* window_;
52 int height_; 54 int height_;
(...skipping 10 matching lines...) Expand all
63 // new DockedWindowLayoutManager(dock_container)); 65 // new DockedWindowLayoutManager(dock_container));
64 // 66 //
65 // TODO(varkha): extend BaseLayoutManager instead of LayoutManager to inherit 67 // TODO(varkha): extend BaseLayoutManager instead of LayoutManager to inherit
66 // common functionality. 68 // common functionality.
67 class ASH_EXPORT DockedWindowLayoutManager 69 class ASH_EXPORT DockedWindowLayoutManager
68 : public SnapToPixelLayoutManager, 70 : public SnapToPixelLayoutManager,
69 public ash::ShellObserver, 71 public ash::ShellObserver,
70 public aura::WindowObserver, 72 public aura::WindowObserver,
71 public aura::client::ActivationChangeObserver, 73 public aura::client::ActivationChangeObserver,
72 public keyboard::KeyboardControllerObserver, 74 public keyboard::KeyboardControllerObserver,
75 public ShelfLayoutManagerObserver,
73 public wm::WindowStateObserver { 76 public wm::WindowStateObserver {
74 public: 77 public:
75 // Maximum width of the docked windows area. 78 // Maximum width of the docked windows area.
76 static const int kMaxDockWidth; 79 static const int kMaxDockWidth;
77 80
78 // Minimum width of the docked windows area. 81 // Minimum width of the docked windows area.
79 static const int kMinDockWidth; 82 static const int kMinDockWidth;
80 83
81 DockedWindowLayoutManager(aura::Window* dock_container, 84 DockedWindowLayoutManager(aura::Window* dock_container,
82 WorkspaceController* workspace_controller); 85 WorkspaceController* workspace_controller);
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 bool visibile) override; 156 bool visibile) override;
154 void SetChildBounds(aura::Window* child, 157 void SetChildBounds(aura::Window* child,
155 const gfx::Rect& requested_bounds) override; 158 const gfx::Rect& requested_bounds) override;
156 159
157 // ash::ShellObserver: 160 // ash::ShellObserver:
158 void OnDisplayWorkAreaInsetsChanged() override; 161 void OnDisplayWorkAreaInsetsChanged() override;
159 void OnFullscreenStateChanged(bool is_fullscreen, 162 void OnFullscreenStateChanged(bool is_fullscreen,
160 aura::Window* root_window) override; 163 aura::Window* root_window) override;
161 void OnShelfAlignmentChanged(aura::Window* root_window) override; 164 void OnShelfAlignmentChanged(aura::Window* root_window) override;
162 165
166 // ShelfLayoutManagerObserver:
167 void OnBackgroundUpdated(ShelfBackgroundType background_type,
168 BackgroundAnimatorChangeType change_type) override;
169
163 // wm::WindowStateObserver: 170 // wm::WindowStateObserver:
164 void OnPreWindowStateTypeChange(wm::WindowState* window_state, 171 void OnPreWindowStateTypeChange(wm::WindowState* window_state,
165 wm::WindowStateType old_type) override; 172 wm::WindowStateType old_type) override;
166 173
167 // aura::WindowObserver: 174 // aura::WindowObserver:
168 void OnWindowBoundsChanged(aura::Window* window, 175 void OnWindowBoundsChanged(aura::Window* window,
169 const gfx::Rect& old_bounds, 176 const gfx::Rect& old_bounds,
170 const gfx::Rect& new_bounds) override; 177 const gfx::Rect& new_bounds) override;
171 void OnWindowVisibilityChanging(aura::Window* window, bool visible) override; 178 void OnWindowVisibilityChanging(aura::Window* window, bool visible) override;
172 void OnWindowDestroying(aura::Window* window) override; 179 void OnWindowDestroying(aura::Window* window) override;
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 327
321 // Observers of dock bounds changes. 328 // Observers of dock bounds changes.
322 base::ObserverList<DockedWindowLayoutManagerObserver> observer_list_; 329 base::ObserverList<DockedWindowLayoutManagerObserver> observer_list_;
323 330
324 DISALLOW_COPY_AND_ASSIGN(DockedWindowLayoutManager); 331 DISALLOW_COPY_AND_ASSIGN(DockedWindowLayoutManager);
325 }; 332 };
326 333
327 } // namespace ash 334 } // namespace ash
328 335
329 #endif // ASH_WM_DOCK_DOCKED_WINDOW_LAYOUT_MANAGER_H_ 336 #endif // ASH_WM_DOCK_DOCKED_WINDOW_LAYOUT_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | ash/wm/dock/docked_window_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698