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

Side by Side Diff: ash/wm/status_area_layout_manager.h

Issue 2268823002: mash: Move more shelf files to ash/common/shelf. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix rebase. Created 4 years, 4 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/panels/panel_window_resizer_unittest.cc ('k') | ash/wm/status_area_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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef ASH_WM_STATUS_AREA_LAYOUT_MANAGER_H_
6 #define ASH_WM_STATUS_AREA_LAYOUT_MANAGER_H_
7
8 #include "ash/common/wm/wm_snap_to_pixel_layout_manager.h"
9 #include "base/macros.h"
10
11 namespace ash {
12
13 class ShelfWidget;
14
15 // StatusAreaLayoutManager is a layout manager responsible for the status area.
16 // In any case when status area needs relayout it redirects this call to
17 // ShelfLayoutManager.
18 class StatusAreaLayoutManager : public wm::WmSnapToPixelLayoutManager {
19 public:
20 explicit StatusAreaLayoutManager(ShelfWidget* shelf_widget);
21 ~StatusAreaLayoutManager() override;
22
23 // Overridden from wm::WmSnapToPixelLayoutManager:
24 void OnWindowResized() override;
25 void SetChildBounds(WmWindow* child,
26 const gfx::Rect& requested_bounds) override;
27
28 private:
29 // Updates layout of the status area. Effectively calls ShelfLayoutManager
30 // to update layout of the shelf.
31 void LayoutStatusArea();
32
33 // True when inside LayoutStatusArea method.
34 // Used to prevent calling itself again from SetChildBounds().
35 bool in_layout_;
36
37 ShelfWidget* shelf_widget_;
38
39 DISALLOW_COPY_AND_ASSIGN(StatusAreaLayoutManager);
40 };
41
42 } // namespace ash
43
44 #endif // ASH_WM_STATUS_AREA_LAYOUT_MANAGER_H_
OLDNEW
« no previous file with comments | « ash/wm/panels/panel_window_resizer_unittest.cc ('k') | ash/wm/status_area_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698