| 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/common/wm_window.h" | 5 #include "ash/common/wm_window.h" |
| 6 | 6 |
| 7 #include "ash/aura/aura_layout_manager_adapter.h" | 7 #include "ash/aura/aura_layout_manager_adapter.h" |
| 8 #include "ash/aura/wm_shell_aura.h" | 8 #include "ash/aura/wm_shell_aura.h" |
| 9 #include "ash/common/ash_constants.h" | 9 #include "ash/common/ash_constants.h" |
| 10 #include "ash/common/wm/window_state.h" | 10 #include "ash/common/wm/window_state.h" |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 | 151 |
| 152 RootWindowController* WmWindow::GetRootWindowController() { | 152 RootWindowController* WmWindow::GetRootWindowController() { |
| 153 aura::Window* root = window_->GetRootWindow(); | 153 aura::Window* root = window_->GetRootWindow(); |
| 154 return root ? RootWindowController::ForWindow(root) : nullptr; | 154 return root ? RootWindowController::ForWindow(root) : nullptr; |
| 155 } | 155 } |
| 156 | 156 |
| 157 WmShell* WmWindow::GetShell() const { | 157 WmShell* WmWindow::GetShell() const { |
| 158 return WmShell::Get(); | 158 return WmShell::Get(); |
| 159 } | 159 } |
| 160 | 160 |
| 161 void WmWindow::SetName(const char* name) { | |
| 162 window_->SetName(name); | |
| 163 } | |
| 164 | |
| 165 std::string WmWindow::GetName() const { | |
| 166 return window_->GetName(); | |
| 167 } | |
| 168 | |
| 169 void WmWindow::SetTitle(const base::string16& title) { | |
| 170 window_->SetTitle(title); | |
| 171 } | |
| 172 | |
| 173 base::string16 WmWindow::GetTitle() const { | |
| 174 return window_->GetTitle(); | |
| 175 } | |
| 176 | |
| 177 void WmWindow::SetShellWindowId(int id) { | 161 void WmWindow::SetShellWindowId(int id) { |
| 178 window_->set_id(id); | 162 window_->set_id(id); |
| 179 } | 163 } |
| 180 | 164 |
| 181 int WmWindow::GetShellWindowId() const { | 165 int WmWindow::GetShellWindowId() const { |
| 182 return window_->id(); | 166 return window_->id(); |
| 183 } | 167 } |
| 184 | 168 |
| 185 ui::wm::WindowType WmWindow::GetType() const { | 169 ui::wm::WindowType WmWindow::GetType() const { |
| 186 return window_->type(); | 170 return window_->type(); |
| (...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 788 observer.OnTransientChildAdded(this, Get(transient)); | 772 observer.OnTransientChildAdded(this, Get(transient)); |
| 789 } | 773 } |
| 790 | 774 |
| 791 void WmWindow::OnTransientChildRemoved(aura::Window* window, | 775 void WmWindow::OnTransientChildRemoved(aura::Window* window, |
| 792 aura::Window* transient) { | 776 aura::Window* transient) { |
| 793 for (auto& observer : transient_observers_) | 777 for (auto& observer : transient_observers_) |
| 794 observer.OnTransientChildRemoved(this, Get(transient)); | 778 observer.OnTransientChildRemoved(this, Get(transient)); |
| 795 } | 779 } |
| 796 | 780 |
| 797 } // namespace ash | 781 } // namespace ash |
| OLD | NEW |