Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/mus/public/cpp/window.h" | 5 #include "components/mus/public/cpp/window.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 355 | 355 |
| 356 bool Window::HasFocus() const { | 356 bool Window::HasFocus() const { |
| 357 return connection_ && connection_->GetFocusedWindow() == this; | 357 return connection_ && connection_->GetFocusedWindow() == this; |
| 358 } | 358 } |
| 359 | 359 |
| 360 void Window::SetCanFocus(bool can_focus) { | 360 void Window::SetCanFocus(bool can_focus) { |
| 361 if (connection_) | 361 if (connection_) |
| 362 tree_client()->SetCanFocus(id_, can_focus); | 362 tree_client()->SetCanFocus(id_, can_focus); |
| 363 } | 363 } |
| 364 | 364 |
| 365 void Window::SetStandardCursor(mus::mojom::Cursor cursor_id) { | |
| 366 if (connection_) | |
| 367 tree_client()->SetStandardCursor(id_, cursor_id); | |
|
sky
2015/12/01 21:48:00
In general we tend to assume the change is going t
| |
| 368 } | |
| 369 | |
| 365 void Window::Embed(mus::mojom::WindowTreeClientPtr client) { | 370 void Window::Embed(mus::mojom::WindowTreeClientPtr client) { |
| 366 Embed(client.Pass(), mus::mojom::WindowTree::ACCESS_POLICY_DEFAULT, | 371 Embed(client.Pass(), mus::mojom::WindowTree::ACCESS_POLICY_DEFAULT, |
| 367 base::Bind(&EmptyEmbedCallback)); | 372 base::Bind(&EmptyEmbedCallback)); |
| 368 } | 373 } |
| 369 | 374 |
| 370 void Window::Embed(mus::mojom::WindowTreeClientPtr client, | 375 void Window::Embed(mus::mojom::WindowTreeClientPtr client, |
| 371 uint32_t policy_bitmask, | 376 uint32_t policy_bitmask, |
| 372 const EmbedCallback& callback) { | 377 const EmbedCallback& callback) { |
| 373 if (PrepareForEmbed()) | 378 if (PrepareForEmbed()) |
| 374 tree_client()->Embed(id_, client.Pass(), policy_bitmask, callback); | 379 tree_client()->Embed(id_, client.Pass(), policy_bitmask, callback); |
| (...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 770 notifier->NotifyWindowReordered(); | 775 notifier->NotifyWindowReordered(); |
| 771 | 776 |
| 772 return true; | 777 return true; |
| 773 } | 778 } |
| 774 | 779 |
| 775 // static | 780 // static |
| 776 Window** Window::GetStackingTarget(Window* window) { | 781 Window** Window::GetStackingTarget(Window* window) { |
| 777 return &window->stacking_target_; | 782 return &window->stacking_target_; |
| 778 } | 783 } |
| 779 } // namespace mus | 784 } // namespace mus |
| OLD | NEW |