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 "services/ui/public/cpp/window.h" | 5 #include "services/ui/public/cpp/window.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <set> | 10 #include <set> |
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
465 client_->RequestClose(this); | 465 client_->RequestClose(this); |
466 } | 466 } |
467 | 467 |
468 std::string Window::GetName() const { | 468 std::string Window::GetName() const { |
469 if (HasSharedProperty(mojom::WindowManager::kName_Property)) | 469 if (HasSharedProperty(mojom::WindowManager::kName_Property)) |
470 return GetSharedProperty<std::string>(mojom::WindowManager::kName_Property); | 470 return GetSharedProperty<std::string>(mojom::WindowManager::kName_Property); |
471 | 471 |
472 return std::string(); | 472 return std::string(); |
473 } | 473 } |
474 | 474 |
| 475 void Window::SetAcceptEvents(bool accept_events) { |
| 476 if (client_) |
| 477 client_->SetAcceptEvents(server_id_, accept_events); |
| 478 } |
| 479 |
475 //////////////////////////////////////////////////////////////////////////////// | 480 //////////////////////////////////////////////////////////////////////////////// |
476 // Window, protected: | 481 // Window, protected: |
477 | 482 |
478 Window::Window() : Window(nullptr, static_cast<Id>(-1)) {} | 483 Window::Window() : Window(nullptr, static_cast<Id>(-1)) {} |
479 | 484 |
480 Window::~Window() { | 485 Window::~Window() { |
481 FOR_EACH_OBSERVER(WindowObserver, observers_, OnWindowDestroying(this)); | 486 FOR_EACH_OBSERVER(WindowObserver, observers_, OnWindowDestroying(this)); |
482 if (client_) | 487 if (client_) |
483 client_->OnWindowDestroying(this); | 488 client_->OnWindowDestroying(this); |
484 | 489 |
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
882 notifier->NotifyWindowReordered(); | 887 notifier->NotifyWindowReordered(); |
883 | 888 |
884 return true; | 889 return true; |
885 } | 890 } |
886 | 891 |
887 // static | 892 // static |
888 Window** Window::GetStackingTarget(Window* window) { | 893 Window** Window::GetStackingTarget(Window* window) { |
889 return &window->stacking_target_; | 894 return &window->stacking_target_; |
890 } | 895 } |
891 } // namespace ui | 896 } // namespace ui |
OLD | NEW |