| 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 WindowTreeHostMus::~WindowTreeHostMus() { | 101 WindowTreeHostMus::~WindowTreeHostMus() { |
| 102 DestroyCompositor(); | 102 DestroyCompositor(); |
| 103 DestroyDispatcher(); | 103 DestroyDispatcher(); |
| 104 } | 104 } |
| 105 | 105 |
| 106 void WindowTreeHostMus::SetBoundsFromServer(const gfx::Rect& bounds) { | 106 void WindowTreeHostMus::SetBoundsFromServer(const gfx::Rect& bounds) { |
| 107 base::AutoReset<bool> resetter(&in_set_bounds_from_server_, true); | 107 base::AutoReset<bool> resetter(&in_set_bounds_from_server_, true); |
| 108 SetBoundsInPixels(bounds); | 108 SetBoundsInPixels(bounds); |
| 109 } | 109 } |
| 110 | 110 |
| 111 void WindowTreeHostMus::SetClientArea(const gfx::Insets& insets) { | 111 void WindowTreeHostMus::SetClientArea( |
| 112 const gfx::Insets& insets, |
| 113 const std::vector<gfx::Rect>& additional_client_area) { |
| 112 delegate_->OnWindowTreeHostClientAreaWillChange(this, insets, | 114 delegate_->OnWindowTreeHostClientAreaWillChange(this, insets, |
| 113 std::vector<gfx::Rect>()); | 115 additional_client_area); |
| 114 } | 116 } |
| 115 | 117 |
| 116 void WindowTreeHostMus::SetHitTestMask(const base::Optional<gfx::Rect>& rect) { | 118 void WindowTreeHostMus::SetHitTestMask(const base::Optional<gfx::Rect>& rect) { |
| 117 delegate_->OnWindowTreeHostHitTestMaskWillChange(this, rect); | 119 delegate_->OnWindowTreeHostHitTestMaskWillChange(this, rect); |
| 118 } | 120 } |
| 119 | 121 |
| 120 display::Display WindowTreeHostMus::GetDisplay() const { | 122 display::Display WindowTreeHostMus::GetDisplay() const { |
| 121 for (const display::Display& display : | 123 for (const display::Display& display : |
| 122 display::Screen::GetScreen()->GetAllDisplays()) { | 124 display::Screen::GetScreen()->GetAllDisplays()) { |
| 123 if (display.id() == display_id_) | 125 if (display.id() == display_id_) |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 void WindowTreeHostMus::OnCloseRequest() { | 158 void WindowTreeHostMus::OnCloseRequest() { |
| 157 OnHostCloseRequested(); | 159 OnHostCloseRequested(); |
| 158 } | 160 } |
| 159 | 161 |
| 160 gfx::ICCProfile WindowTreeHostMus::GetICCProfileForCurrentDisplay() { | 162 gfx::ICCProfile WindowTreeHostMus::GetICCProfileForCurrentDisplay() { |
| 161 // TODO: This should read the profile from mus. crbug.com/647510 | 163 // TODO: This should read the profile from mus. crbug.com/647510 |
| 162 return gfx::ICCProfile(); | 164 return gfx::ICCProfile(); |
| 163 } | 165 } |
| 164 | 166 |
| 165 } // namespace aura | 167 } // namespace aura |
| OLD | NEW |