| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "ui/aura/mus/window_tree_host_mus.h" | 5 #include "ui/aura/mus/window_tree_host_mus.h" |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "ui/aura/env.h" | 8 #include "ui/aura/env.h" |
| 9 #include "ui/aura/mus/input_method_mus.h" | 9 #include "ui/aura/mus/input_method_mus.h" |
| 10 #include "ui/aura/mus/window_port_mus.h" | 10 #include "ui/aura/mus/window_port_mus.h" |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 WindowTreeHostMus::~WindowTreeHostMus() { | 95 WindowTreeHostMus::~WindowTreeHostMus() { |
| 96 DestroyCompositor(); | 96 DestroyCompositor(); |
| 97 DestroyDispatcher(); | 97 DestroyDispatcher(); |
| 98 } | 98 } |
| 99 | 99 |
| 100 void WindowTreeHostMus::SetBoundsFromServer(const gfx::Rect& bounds) { | 100 void WindowTreeHostMus::SetBoundsFromServer(const gfx::Rect& bounds) { |
| 101 base::AutoReset<bool> resetter(&in_set_bounds_from_server_, true); | 101 base::AutoReset<bool> resetter(&in_set_bounds_from_server_, true); |
| 102 SetBounds(bounds); | 102 SetBounds(bounds); |
| 103 } | 103 } |
| 104 | 104 |
| 105 void WindowTreeHostMus::SetClientArea(const gfx::Insets& insets) { |
| 106 delegate_->OnWindowTreeHostClientAreaWillChange(this, insets, |
| 107 std::vector<gfx::Rect>()); |
| 108 } |
| 109 |
| 110 void WindowTreeHostMus::SetHitTestMask(const base::Optional<gfx::Rect>& rect) { |
| 111 delegate_->OnWindowTreeHostHitTestMaskWillChange(this, rect); |
| 112 } |
| 113 |
| 105 display::Display WindowTreeHostMus::GetDisplay() const { | 114 display::Display WindowTreeHostMus::GetDisplay() const { |
| 106 for (const display::Display& display : | 115 for (const display::Display& display : |
| 107 display::Screen::GetScreen()->GetAllDisplays()) { | 116 display::Screen::GetScreen()->GetAllDisplays()) { |
| 108 if (display.id() == display_id_) | 117 if (display.id() == display_id_) |
| 109 return display; | 118 return display; |
| 110 } | 119 } |
| 111 return display::Display(); | 120 return display::Display(); |
| 112 } | 121 } |
| 113 | 122 |
| 114 void WindowTreeHostMus::ShowImpl() { | 123 void WindowTreeHostMus::ShowImpl() { |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 void WindowTreeHostMus::OnCloseRequest() { | 155 void WindowTreeHostMus::OnCloseRequest() { |
| 147 OnHostCloseRequested(); | 156 OnHostCloseRequested(); |
| 148 } | 157 } |
| 149 | 158 |
| 150 gfx::ICCProfile WindowTreeHostMus::GetICCProfileForCurrentDisplay() { | 159 gfx::ICCProfile WindowTreeHostMus::GetICCProfileForCurrentDisplay() { |
| 151 // TODO: This should read the profile from mus. crbug.com/647510 | 160 // TODO: This should read the profile from mus. crbug.com/647510 |
| 152 return gfx::ICCProfile(); | 161 return gfx::ICCProfile(); |
| 153 } | 162 } |
| 154 | 163 |
| 155 } // namespace aura | 164 } // namespace aura |
| OLD | NEW |