| 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 "ui/views/mus/desktop_window_tree_host_mus.h" | 5 #include "ui/views/mus/desktop_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/client/aura_constants.h" | 8 #include "ui/aura/client/aura_constants.h" |
| 9 #include "ui/aura/client/drag_drop_client.h" | 9 #include "ui/aura/client/drag_drop_client.h" |
| 10 #include "ui/aura/client/focus_client.h" | 10 #include "ui/aura/client/focus_client.h" |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 | 313 |
| 314 void DesktopWindowTreeHostMus::SetVisibleOnAllWorkspaces(bool always_visible) { | 314 void DesktopWindowTreeHostMus::SetVisibleOnAllWorkspaces(bool always_visible) { |
| 315 // Not applicable to chromeos. | 315 // Not applicable to chromeos. |
| 316 } | 316 } |
| 317 | 317 |
| 318 bool DesktopWindowTreeHostMus::IsVisibleOnAllWorkspaces() const { | 318 bool DesktopWindowTreeHostMus::IsVisibleOnAllWorkspaces() const { |
| 319 return false; | 319 return false; |
| 320 } | 320 } |
| 321 | 321 |
| 322 bool DesktopWindowTreeHostMus::SetWindowTitle(const base::string16& title) { | 322 bool DesktopWindowTreeHostMus::SetWindowTitle(const base::string16& title) { |
| 323 if (window()->title() == title) | 323 if (window()->GetTitle() == title) |
| 324 return false; | 324 return false; |
| 325 window()->SetTitle(title); | 325 window()->SetTitle(title); |
| 326 return true; | 326 return true; |
| 327 } | 327 } |
| 328 | 328 |
| 329 void DesktopWindowTreeHostMus::ClearNativeFocus() { | 329 void DesktopWindowTreeHostMus::ClearNativeFocus() { |
| 330 aura::client::FocusClient* client = aura::client::GetFocusClient(window()); | 330 aura::client::FocusClient* client = aura::client::GetFocusClient(window()); |
| 331 if (client && window()->Contains(client->GetFocusedWindow())) | 331 if (client && window()->Contains(client->GetFocusedWindow())) |
| 332 client->ResetFocusWithinActiveWindow(window()); | 332 client->ResetFocusWithinActiveWindow(window()); |
| 333 } | 333 } |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 if (window == this->window()) { | 454 if (window == this->window()) { |
| 455 is_active_ = true; | 455 is_active_ = true; |
| 456 desktop_native_widget_aura_->HandleActivationChanged(true); | 456 desktop_native_widget_aura_->HandleActivationChanged(true); |
| 457 } else if (is_active_) { | 457 } else if (is_active_) { |
| 458 is_active_ = false; | 458 is_active_ = false; |
| 459 desktop_native_widget_aura_->HandleActivationChanged(false); | 459 desktop_native_widget_aura_->HandleActivationChanged(false); |
| 460 } | 460 } |
| 461 } | 461 } |
| 462 | 462 |
| 463 } // namespace views | 463 } // namespace views |
| OLD | NEW |