| 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 |
| 76 private: | 78 private: |
| 77 friend class RootObserver; | 79 friend class RootObserver; |
| 78 | 80 |
| 79 typedef std::map<Id, View*> IdToViewMap; | 81 typedef std::map<Id, View*> IdToViewMap; |
| 80 | 82 |
| 81 // Overridden from ViewManager: | 83 // Overridden from ViewManager: |
| 82 const std::string& GetEmbedderURL() const override; | 84 const std::string& GetEmbedderURL() const override; |
| 83 const std::vector<View*>& GetRoots() const override; | 85 const std::vector<View*>& GetRoots() const override; |
| 84 View* GetViewById(Id id) override; | 86 View* GetViewById(Id id) override; |
| 85 | 87 |
| 86 // Overridden from InterfaceImpl: | |
| 87 void OnConnectionEstablished() override; | |
| 88 | |
| 89 // Overridden from ViewManagerClient: | 88 // Overridden from ViewManagerClient: |
| 90 void OnEmbed(ConnectionSpecificId connection_id, | 89 void OnEmbed(ConnectionSpecificId connection_id, |
| 91 const String& creator_url, | 90 const String& creator_url, |
| 92 ViewDataPtr root, | 91 ViewDataPtr root, |
| 93 InterfaceRequest<ServiceProvider> parent_services, | 92 InterfaceRequest<ServiceProvider> parent_services, |
| 94 ScopedMessagePipeHandle window_manager_pipe) override; | 93 ScopedMessagePipeHandle window_manager_pipe) override; |
| 95 void OnEmbeddedAppDisconnected(Id view_id) override; | 94 void OnEmbeddedAppDisconnected(Id view_id) override; |
| 96 void OnViewBoundsChanged(Id view_id, | 95 void OnViewBoundsChanged(Id view_id, |
| 97 RectPtr old_bounds, | 96 RectPtr old_bounds, |
| 98 RectPtr new_bounds) override; | 97 RectPtr new_bounds) override; |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 ViewManagerService* service_; | 144 ViewManagerService* service_; |
| 146 | 145 |
| 147 WindowManagerPtr window_manager_; | 146 WindowManagerPtr window_manager_; |
| 148 | 147 |
| 149 DISALLOW_COPY_AND_ASSIGN(ViewManagerClientImpl); | 148 DISALLOW_COPY_AND_ASSIGN(ViewManagerClientImpl); |
| 150 }; | 149 }; |
| 151 | 150 |
| 152 } // namespace mojo | 151 } // namespace mojo |
| 153 | 152 |
| 154 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_MANAGER_CLIENT_IMPL_H_ | 153 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_MANAGER_CLIENT_IMPL_H_ |
| OLD | NEW |