| 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 75 | 75 | 
| 76   Shell* shell() { return shell_; } | 76   Shell* shell() { return shell_; } | 
| 77 | 77 | 
| 78  private: | 78  private: | 
| 79   friend class RootObserver; | 79   friend class RootObserver; | 
| 80 | 80 | 
| 81   typedef std::map<Id, View*> IdToViewMap; | 81   typedef std::map<Id, View*> IdToViewMap; | 
| 82 | 82 | 
| 83   // Overridden from ViewManager: | 83   // Overridden from ViewManager: | 
| 84   virtual void SetWindowManagerDelegate( | 84   virtual void SetWindowManagerDelegate( | 
| 85       WindowManagerDelegate* delegate) OVERRIDE; | 85       WindowManagerDelegate* delegate) override; | 
| 86   virtual void DispatchEvent(View* target, EventPtr event) OVERRIDE; | 86   virtual void DispatchEvent(View* target, EventPtr event) override; | 
| 87   virtual const std::string& GetEmbedderURL() const OVERRIDE; | 87   virtual const std::string& GetEmbedderURL() const override; | 
| 88   virtual const std::vector<View*>& GetRoots() const OVERRIDE; | 88   virtual const std::vector<View*>& GetRoots() const override; | 
| 89   virtual View* GetViewById(Id id) OVERRIDE; | 89   virtual View* GetViewById(Id id) override; | 
| 90 | 90 | 
| 91   // Overridden from InterfaceImpl: | 91   // Overridden from InterfaceImpl: | 
| 92   virtual void OnConnectionEstablished() OVERRIDE; | 92   virtual void OnConnectionEstablished() override; | 
| 93 | 93 | 
| 94   // Overridden from ViewManagerClient: | 94   // Overridden from ViewManagerClient: | 
| 95   virtual void OnEmbed(ConnectionSpecificId connection_id, | 95   virtual void OnEmbed(ConnectionSpecificId connection_id, | 
| 96                        const String& creator_url, | 96                        const String& creator_url, | 
| 97                        ViewDataPtr root, | 97                        ViewDataPtr root, | 
| 98                        InterfaceRequest<ServiceProvider> services) OVERRIDE; | 98                        InterfaceRequest<ServiceProvider> services) override; | 
| 99   virtual void OnViewBoundsChanged(Id view_id, | 99   virtual void OnViewBoundsChanged(Id view_id, | 
| 100                                    RectPtr old_bounds, | 100                                    RectPtr old_bounds, | 
| 101                                    RectPtr new_bounds) OVERRIDE; | 101                                    RectPtr new_bounds) override; | 
| 102   virtual void OnViewHierarchyChanged(Id view_id, | 102   virtual void OnViewHierarchyChanged(Id view_id, | 
| 103                                       Id new_parent_id, | 103                                       Id new_parent_id, | 
| 104                                       Id old_parent_id, | 104                                       Id old_parent_id, | 
| 105                                       Array<ViewDataPtr> views) OVERRIDE; | 105                                       Array<ViewDataPtr> views) override; | 
| 106   virtual void OnViewReordered(Id view_id, | 106   virtual void OnViewReordered(Id view_id, | 
| 107                                Id relative_view_id, | 107                                Id relative_view_id, | 
| 108                                OrderDirection direction) OVERRIDE; | 108                                OrderDirection direction) override; | 
| 109   virtual void OnViewDeleted(Id view_id) OVERRIDE; | 109   virtual void OnViewDeleted(Id view_id) override; | 
| 110   virtual void OnViewVisibilityChanged(Id view_id, bool visible) OVERRIDE; | 110   virtual void OnViewVisibilityChanged(Id view_id, bool visible) override; | 
| 111   virtual void OnViewDrawnStateChanged(Id view_id, bool drawn) OVERRIDE; | 111   virtual void OnViewDrawnStateChanged(Id view_id, bool drawn) override; | 
| 112   virtual void OnViewInputEvent(Id view_id, | 112   virtual void OnViewInputEvent(Id view_id, | 
| 113                                 EventPtr event, | 113                                 EventPtr event, | 
| 114                                 const Callback<void()>& callback) OVERRIDE; | 114                                 const Callback<void()>& callback) override; | 
| 115   virtual void Embed( | 115   virtual void Embed( | 
| 116       const String& url, | 116       const String& url, | 
| 117       InterfaceRequest<ServiceProvider> service_provider) OVERRIDE; | 117       InterfaceRequest<ServiceProvider> service_provider) override; | 
| 118   virtual void DispatchOnViewInputEvent(EventPtr event) OVERRIDE; | 118   virtual void DispatchOnViewInputEvent(EventPtr event) override; | 
| 119 | 119 | 
| 120     // Overridden from WindowManagerClient: | 120     // Overridden from WindowManagerClient: | 
| 121   virtual void OnWindowManagerReady() OVERRIDE; | 121   virtual void OnWindowManagerReady() override; | 
| 122   virtual void OnCaptureChanged(Id old_capture_view_id, | 122   virtual void OnCaptureChanged(Id old_capture_view_id, | 
| 123                                 Id new_capture_view_id) OVERRIDE; | 123                                 Id new_capture_view_id) override; | 
| 124   virtual void OnFocusChanged(Id old_focused_view_id, | 124   virtual void OnFocusChanged(Id old_focused_view_id, | 
| 125                               Id new_focused_view_id) OVERRIDE; | 125                               Id new_focused_view_id) override; | 
| 126   virtual void OnActiveWindowChanged(Id old_focused_window, | 126   virtual void OnActiveWindowChanged(Id old_focused_window, | 
| 127                                      Id new_focused_window) OVERRIDE; | 127                                      Id new_focused_window) override; | 
| 128 | 128 | 
| 129   void RemoveRoot(View* root); | 129   void RemoveRoot(View* root); | 
| 130 | 130 | 
| 131   void OnActionCompleted(bool success); | 131   void OnActionCompleted(bool success); | 
| 132   void OnActionCompletedWithErrorCode(ErrorCode code); | 132   void OnActionCompletedWithErrorCode(ErrorCode code); | 
| 133 | 133 | 
| 134   BitmapUploader* BitmapUploaderForView(Id view_id); | 134   BitmapUploader* BitmapUploaderForView(Id view_id); | 
| 135 | 135 | 
| 136   base::Callback<void(bool)> ActionCompletedCallback(); | 136   base::Callback<void(bool)> ActionCompletedCallback(); | 
| 137   base::Callback<void(ErrorCode)> ActionCompletedCallbackWithErrorCode(); | 137   base::Callback<void(ErrorCode)> ActionCompletedCallbackWithErrorCode(); | 
| (...skipping 20 matching lines...) Expand all  Loading... | 
| 158   // TODO(jamesr): Remove once all callers switch from SetContents to | 158   // TODO(jamesr): Remove once all callers switch from SetContents to | 
| 159   // SetSurfaceId. | 159   // SetSurfaceId. | 
| 160   Shell* shell_; | 160   Shell* shell_; | 
| 161 | 161 | 
| 162   DISALLOW_COPY_AND_ASSIGN(ViewManagerClientImpl); | 162   DISALLOW_COPY_AND_ASSIGN(ViewManagerClientImpl); | 
| 163 }; | 163 }; | 
| 164 | 164 | 
| 165 }  // namespace mojo | 165 }  // namespace mojo | 
| 166 | 166 | 
| 167 #endif  // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_MANAGER_CLIENT_IMPL_H_ | 167 #endif  // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_MANAGER_CLIENT_IMPL_H_ | 
| OLD | NEW | 
|---|