Chromium Code Reviews| 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_VIEW_MANAGER_VIEW_MANAGER_SERVICE_IMPL_H_ | 5 #ifndef MOJO_SERVICES_VIEW_MANAGER_VIEW_MANAGER_SERVICE_IMPL_H_ |
| 6 #define MOJO_SERVICES_VIEW_MANAGER_VIEW_MANAGER_SERVICE_IMPL_H_ | 6 #define MOJO_SERVICES_VIEW_MANAGER_VIEW_MANAGER_SERVICE_IMPL_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
|
viettrungluu
2014/10/06 16:12:21
"
Mostyn Bramley-Moore
2014/10/06 17:13:34
Done.
| |
| 14 #include "base/containers/hash_tables.h" | 14 #include "base/containers/hash_tables.h" |
| 15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 16 #include "mojo/services/public/interfaces/surfaces/surface_id.mojom.h" | 16 #include "mojo/services/public/interfaces/surfaces/surface_id.mojom.h" |
| 17 #include "mojo/services/public/interfaces/view_manager/view_manager.mojom.h" | 17 #include "mojo/services/public/interfaces/view_manager/view_manager.mojom.h" |
| 18 #include "mojo/services/view_manager/access_policy_delegate.h" | 18 #include "mojo/services/view_manager/access_policy_delegate.h" |
| 19 #include "mojo/services/view_manager/ids.h" | 19 #include "mojo/services/view_manager/ids.h" |
| 20 #include "mojo/services/view_manager/view_manager_export.h" | 20 #include "mojo/services/view_manager/view_manager_export.h" |
| 21 | 21 |
| 22 namespace gfx { | 22 namespace gfx { |
| 23 class Rect; | 23 class Rect; |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 142 // CanDescendIntoViewForViewTree() returns true. | 142 // CanDescendIntoViewForViewTree() returns true. |
| 143 void GetViewTreeImpl(const ServerView* view, | 143 void GetViewTreeImpl(const ServerView* view, |
| 144 std::vector<const ServerView*>* views) const; | 144 std::vector<const ServerView*>* views) const; |
| 145 | 145 |
| 146 // Notify the client if the drawn state of any of the roots changes. | 146 // Notify the client if the drawn state of any of the roots changes. |
| 147 // |view| is the view that is changing to the drawn state |new_drawn_value|. | 147 // |view| is the view that is changing to the drawn state |new_drawn_value|. |
| 148 void NotifyDrawnStateChanged(const ServerView* view, bool new_drawn_value); | 148 void NotifyDrawnStateChanged(const ServerView* view, bool new_drawn_value); |
| 149 | 149 |
| 150 // ViewManagerService: | 150 // ViewManagerService: |
| 151 virtual void CreateView(Id transport_view_id, | 151 virtual void CreateView(Id transport_view_id, |
| 152 const Callback<void(ErrorCode)>& callback) OVERRIDE; | 152 const Callback<void(ErrorCode)>& callback) override; |
| 153 virtual void DeleteView(Id transport_view_id, | 153 virtual void DeleteView(Id transport_view_id, |
| 154 const Callback<void(bool)>& callback) OVERRIDE; | 154 const Callback<void(bool)>& callback) override; |
| 155 virtual void AddView(Id parent_id, | 155 virtual void AddView(Id parent_id, |
| 156 Id child_id, | 156 Id child_id, |
| 157 const Callback<void(bool)>& callback) OVERRIDE; | 157 const Callback<void(bool)>& callback) override; |
| 158 virtual void RemoveViewFromParent( | 158 virtual void RemoveViewFromParent( |
| 159 Id view_id, | 159 Id view_id, |
| 160 const Callback<void(bool)>& callback) OVERRIDE; | 160 const Callback<void(bool)>& callback) override; |
| 161 virtual void ReorderView(Id view_id, | 161 virtual void ReorderView(Id view_id, |
| 162 Id relative_view_id, | 162 Id relative_view_id, |
| 163 OrderDirection direction, | 163 OrderDirection direction, |
| 164 const Callback<void(bool)>& callback) OVERRIDE; | 164 const Callback<void(bool)>& callback) override; |
| 165 virtual void GetViewTree( | 165 virtual void GetViewTree( |
| 166 Id view_id, | 166 Id view_id, |
| 167 const Callback<void(Array<ViewDataPtr>)>& callback) OVERRIDE; | 167 const Callback<void(Array<ViewDataPtr>)>& callback) override; |
| 168 virtual void SetViewSurfaceId(Id view_id, | 168 virtual void SetViewSurfaceId(Id view_id, |
| 169 SurfaceIdPtr surface_id, | 169 SurfaceIdPtr surface_id, |
| 170 const Callback<void(bool)>& callback) OVERRIDE; | 170 const Callback<void(bool)>& callback) override; |
| 171 virtual void SetViewBounds(Id view_id, | 171 virtual void SetViewBounds(Id view_id, |
| 172 RectPtr bounds, | 172 RectPtr bounds, |
| 173 const Callback<void(bool)>& callback) OVERRIDE; | 173 const Callback<void(bool)>& callback) override; |
| 174 virtual void SetViewVisibility(Id view_id, | 174 virtual void SetViewVisibility(Id view_id, |
| 175 bool visible, | 175 bool visible, |
| 176 const Callback<void(bool)>& callback) OVERRIDE; | 176 const Callback<void(bool)>& callback) override; |
| 177 virtual void Embed(const String& url, | 177 virtual void Embed(const String& url, |
| 178 Id view_id, | 178 Id view_id, |
| 179 ServiceProviderPtr service_provider, | 179 ServiceProviderPtr service_provider, |
| 180 const Callback<void(bool)>& callback) OVERRIDE; | 180 const Callback<void(bool)>& callback) override; |
| 181 virtual void DispatchOnViewInputEvent(Id view_id, EventPtr event) OVERRIDE; | 181 virtual void DispatchOnViewInputEvent(Id view_id, EventPtr event) override; |
| 182 | 182 |
| 183 // InterfaceImpl: | 183 // InterfaceImpl: |
| 184 virtual void OnConnectionEstablished() override; | 184 virtual void OnConnectionEstablished() override; |
| 185 | 185 |
| 186 // AccessPolicyDelegate: | 186 // AccessPolicyDelegate: |
| 187 virtual const base::hash_set<Id>& GetRootsForAccessPolicy() const OVERRIDE; | 187 virtual const base::hash_set<Id>& GetRootsForAccessPolicy() const override; |
| 188 virtual bool IsViewKnownForAccessPolicy( | 188 virtual bool IsViewKnownForAccessPolicy( |
| 189 const ServerView* view) const OVERRIDE; | 189 const ServerView* view) const override; |
| 190 virtual bool IsViewRootOfAnotherConnectionForAccessPolicy( | 190 virtual bool IsViewRootOfAnotherConnectionForAccessPolicy( |
| 191 const ServerView* view) const OVERRIDE; | 191 const ServerView* view) const override; |
| 192 | 192 |
| 193 ConnectionManager* connection_manager_; | 193 ConnectionManager* connection_manager_; |
| 194 | 194 |
| 195 // Id of this connection as assigned by ConnectionManager. | 195 // Id of this connection as assigned by ConnectionManager. |
| 196 const ConnectionSpecificId id_; | 196 const ConnectionSpecificId id_; |
| 197 | 197 |
| 198 // URL this connection was created for. | 198 // URL this connection was created for. |
| 199 const std::string url_; | 199 const std::string url_; |
| 200 | 200 |
| 201 // ID of the connection that created us. If 0 it indicates either we were | 201 // ID of the connection that created us. If 0 it indicates either we were |
| (...skipping 29 matching lines...) Expand all Loading... | |
| 231 }; | 231 }; |
| 232 | 232 |
| 233 #if defined(OS_WIN) | 233 #if defined(OS_WIN) |
| 234 #pragma warning(pop) | 234 #pragma warning(pop) |
| 235 #endif | 235 #endif |
| 236 | 236 |
| 237 } // namespace service | 237 } // namespace service |
| 238 } // namespace mojo | 238 } // namespace mojo |
| 239 | 239 |
| 240 #endif // MOJO_SERVICES_VIEW_MANAGER_VIEW_MANAGER_SERVICE_IMPL_H_ | 240 #endif // MOJO_SERVICES_VIEW_MANAGER_VIEW_MANAGER_SERVICE_IMPL_H_ |
| OLD | NEW |