OLD | NEW |
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 Loading... |
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 |
OLD | NEW |