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 "mojo/services/public/cpp/view_manager/view_manager.h" | 5 #include "mojo/services/public/cpp/view_manager/view_manager.h" |
6 | 6 |
7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "mojo/public/cpp/application/application_connection.h" | 10 #include "mojo/public/cpp/application/application_connection.h" |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 OVERRIDE { | 76 OVERRIDE { |
77 ViewManager::ConfigureIncomingConnection(connection, this); | 77 ViewManager::ConfigureIncomingConnection(connection, this); |
78 return true; | 78 return true; |
79 } | 79 } |
80 | 80 |
81 // Overridden from ViewManagerDelegate: | 81 // Overridden from ViewManagerDelegate: |
82 virtual void OnRootAdded(ViewManager* view_manager, | 82 virtual void OnRootAdded(ViewManager* view_manager, |
83 Node* root) OVERRIDE { | 83 Node* root) OVERRIDE { |
84 callback_.Run(view_manager, root); | 84 callback_.Run(view_manager, root); |
85 } | 85 } |
| 86 virtual void OnViewManagerDisconnected(ViewManager* view_manager) OVERRIDE {} |
86 | 87 |
87 ScopedVector<ApplicationImpl> apps_; | 88 ScopedVector<ApplicationImpl> apps_; |
88 LoadedCallback callback_; | 89 LoadedCallback callback_; |
89 | 90 |
90 DISALLOW_COPY_AND_ASSIGN(ConnectServiceLoader); | 91 DISALLOW_COPY_AND_ASSIGN(ConnectServiceLoader); |
91 }; | 92 }; |
92 | 93 |
93 class ActiveViewChangedObserver : public NodeObserver { | 94 class ActiveViewChangedObserver : public NodeObserver { |
94 public: | 95 public: |
95 explicit ActiveViewChangedObserver(Node* node) | 96 explicit ActiveViewChangedObserver(Node* node) |
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
767 // TODO(beng): tests for view event dispatcher. | 768 // TODO(beng): tests for view event dispatcher. |
768 // - verify that we see events for all views. | 769 // - verify that we see events for all views. |
769 | 770 |
770 // TODO(beng): tests for focus: | 771 // TODO(beng): tests for focus: |
771 // - focus between two nodes known to a connection | 772 // - focus between two nodes known to a connection |
772 // - focus between nodes unknown to one of the connections. | 773 // - focus between nodes unknown to one of the connections. |
773 // - focus between nodes unknown to either connection. | 774 // - focus between nodes unknown to either connection. |
774 | 775 |
775 } // namespace view_manager | 776 } // namespace view_manager |
776 } // namespace mojo | 777 } // namespace mojo |
OLD | NEW |