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

Side by Side Diff: ash/mus/bridge/wm_shelf_mus.cc

Issue 2035543004: Shuffles and renames ash/common/wm classes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: random changes for chrome tests Created 4 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/mus/bridge/wm_shelf_mus.h" 5 #include "ash/mus/bridge/wm_shelf_mus.h"
6 6
7 #include "ash/mus/bridge/wm_window_mus.h" 7 #include "ash/mus/bridge/wm_window_mus.h"
8 #include "ash/mus/shelf_layout_manager.h" 8 #include "ash/mus/shelf_layout_manager.h"
9 #include "components/mus/public/cpp/window.h" 9 #include "components/mus/public/cpp/window.h"
10 10
11 // TODO(sky): fully implement this http://crbug.com/612631 . 11 // TODO(sky): fully implement this http://crbug.com/612631 .
12 #undef NOTIMPLEMENTED 12 #undef NOTIMPLEMENTED
13 #define NOTIMPLEMENTED() DVLOG(1) << "notimplemented" 13 #define NOTIMPLEMENTED() DVLOG(1) << "notimplemented"
14 14
15 namespace ash { 15 namespace ash {
16 namespace mus { 16 namespace mus {
17 17
18 WmShelfMus::WmShelfMus(ShelfLayoutManager* shelf_layout_manager) 18 WmShelfMus::WmShelfMus(ShelfLayoutManager* shelf_layout_manager)
19 : shelf_layout_manager_(shelf_layout_manager) {} 19 : shelf_layout_manager_(shelf_layout_manager) {}
20 20
21 WmShelfMus::~WmShelfMus() {} 21 WmShelfMus::~WmShelfMus() {}
22 22
23 wm::WmWindow* WmShelfMus::GetWindow() { 23 WmWindow* WmShelfMus::GetWindow() {
24 return WmWindowMus::Get(shelf_layout_manager_->GetShelfWindow()); 24 return WmWindowMus::Get(shelf_layout_manager_->GetShelfWindow());
25 } 25 }
26 26
27 wm::ShelfAlignment WmShelfMus::GetAlignment() const { 27 wm::ShelfAlignment WmShelfMus::GetAlignment() const {
28 switch (shelf_layout_manager_->alignment()) { 28 switch (shelf_layout_manager_->alignment()) {
29 case mash::shelf::mojom::Alignment::BOTTOM: 29 case mash::shelf::mojom::Alignment::BOTTOM:
30 return wm::SHELF_ALIGNMENT_BOTTOM; 30 return wm::SHELF_ALIGNMENT_BOTTOM;
31 case mash::shelf::mojom::Alignment::LEFT: 31 case mash::shelf::mojom::Alignment::LEFT:
32 return wm::SHELF_ALIGNMENT_LEFT; 32 return wm::SHELF_ALIGNMENT_LEFT;
33 case mash::shelf::mojom::Alignment::RIGHT: 33 case mash::shelf::mojom::Alignment::RIGHT:
(...skipping 10 matching lines...) Expand all
44 44
45 void WmShelfMus::UpdateVisibilityState() { 45 void WmShelfMus::UpdateVisibilityState() {
46 NOTIMPLEMENTED(); 46 NOTIMPLEMENTED();
47 } 47 }
48 48
49 ShelfVisibilityState WmShelfMus::GetVisibilityState() const { 49 ShelfVisibilityState WmShelfMus::GetVisibilityState() const {
50 NOTIMPLEMENTED(); 50 NOTIMPLEMENTED();
51 return shelf_layout_manager_->GetShelfWindow() ? SHELF_VISIBLE : SHELF_HIDDEN; 51 return shelf_layout_manager_->GetShelfWindow() ? SHELF_VISIBLE : SHELF_HIDDEN;
52 } 52 }
53 53
54 void WmShelfMus::UpdateIconPositionForWindow(wm::WmWindow* window) { 54 void WmShelfMus::UpdateIconPositionForWindow(WmWindow* window) {
55 NOTIMPLEMENTED(); 55 NOTIMPLEMENTED();
56 } 56 }
57 57
58 gfx::Rect WmShelfMus::GetScreenBoundsOfItemIconForWindow(wm::WmWindow* window) { 58 gfx::Rect WmShelfMus::GetScreenBoundsOfItemIconForWindow(WmWindow* window) {
59 NOTIMPLEMENTED(); 59 NOTIMPLEMENTED();
60 return gfx::Rect(); 60 return gfx::Rect();
61 } 61 }
62 62
63 void WmShelfMus::AddObserver(wm::WmShelfObserver* observer) { 63 void WmShelfMus::AddObserver(wm::WmShelfObserver* observer) {
64 observers_.AddObserver(observer); 64 observers_.AddObserver(observer);
65 } 65 }
66 66
67 void WmShelfMus::RemoveObserver(wm::WmShelfObserver* observer) { 67 void WmShelfMus::RemoveObserver(wm::WmShelfObserver* observer) {
68 observers_.RemoveObserver(observer); 68 observers_.RemoveObserver(observer);
69 } 69 }
70 70
71 } // namespace mus 71 } // namespace mus
72 } // namespace ash 72 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698