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 #ifndef MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_MANAGER_CLIENT_IMPL_H_ | 5 #ifndef MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_MANAGER_CLIENT_IMPL_H_ |
6 #define MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_MANAGER_CLIENT_IMPL_H_ | 6 #define MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_MANAGER_CLIENT_IMPL_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 } | 66 } |
67 void ClearChangeAckedCallback() { | 67 void ClearChangeAckedCallback() { |
68 change_acked_callback_ = base::Callback<void(void)>(); | 68 change_acked_callback_ = base::Callback<void(void)>(); |
69 } | 69 } |
70 | 70 |
71 // Start/stop tracking views. While tracked, they can be retrieved via | 71 // Start/stop tracking views. While tracked, they can be retrieved via |
72 // ViewManager::GetViewById. | 72 // ViewManager::GetViewById. |
73 void AddView(View* view); | 73 void AddView(View* view); |
74 void RemoveView(Id view_id); | 74 void RemoveView(Id view_id); |
75 | 75 |
76 void OnConnectionEstablished(); | |
77 | |
78 private: | 76 private: |
79 friend class RootObserver; | 77 friend class RootObserver; |
80 | 78 |
81 typedef std::map<Id, View*> IdToViewMap; | 79 typedef std::map<Id, View*> IdToViewMap; |
82 | 80 |
83 // Overridden from ViewManager: | 81 // Overridden from ViewManager: |
84 const std::string& GetEmbedderURL() const override; | 82 const std::string& GetEmbedderURL() const override; |
85 const std::vector<View*>& GetRoots() const override; | 83 const std::vector<View*>& GetRoots() const override; |
86 View* GetViewById(Id id) override; | 84 View* GetViewById(Id id) override; |
87 | 85 |
| 86 // Overridden from InterfaceImpl: |
| 87 void OnConnectionEstablished() override; |
| 88 |
88 // Overridden from ViewManagerClient: | 89 // Overridden from ViewManagerClient: |
89 void OnEmbed(ConnectionSpecificId connection_id, | 90 void OnEmbed(ConnectionSpecificId connection_id, |
90 const String& creator_url, | 91 const String& creator_url, |
91 ViewDataPtr root, | 92 ViewDataPtr root, |
92 InterfaceRequest<ServiceProvider> parent_services, | 93 InterfaceRequest<ServiceProvider> parent_services, |
93 ScopedMessagePipeHandle window_manager_pipe) override; | 94 ScopedMessagePipeHandle window_manager_pipe) override; |
94 void OnEmbeddedAppDisconnected(Id view_id) override; | 95 void OnEmbeddedAppDisconnected(Id view_id) override; |
95 void OnViewBoundsChanged(Id view_id, | 96 void OnViewBoundsChanged(Id view_id, |
96 RectPtr old_bounds, | 97 RectPtr old_bounds, |
97 RectPtr new_bounds) override; | 98 RectPtr new_bounds) override; |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 ViewManagerService* service_; | 145 ViewManagerService* service_; |
145 | 146 |
146 WindowManagerPtr window_manager_; | 147 WindowManagerPtr window_manager_; |
147 | 148 |
148 DISALLOW_COPY_AND_ASSIGN(ViewManagerClientImpl); | 149 DISALLOW_COPY_AND_ASSIGN(ViewManagerClientImpl); |
149 }; | 150 }; |
150 | 151 |
151 } // namespace mojo | 152 } // namespace mojo |
152 | 153 |
153 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_MANAGER_CLIENT_IMPL_H_ | 154 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_MANAGER_CLIENT_IMPL_H_ |
OLD | NEW |