| 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_VIEW_H_ | 5 #ifndef MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_H_ |
| 6 #define MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_H_ | 6 #define MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/observer_list.h" | 11 #include "base/observer_list.h" |
| 12 #include "mojo/public/cpp/bindings/array.h" | 12 #include "mojo/public/cpp/bindings/array.h" |
| 13 #include "mojo/public/interfaces/application/service_provider.mojom.h" | 13 #include "mojo/public/interfaces/application/service_provider.mojom.h" |
| 14 #include "mojo/services/public/cpp/view_manager/types.h" | 14 #include "mojo/services/public/cpp/view_manager/types.h" |
| 15 #include "mojo/services/public/interfaces/surfaces/surface_id.mojom.h" |
| 15 #include "mojo/services/public/interfaces/view_manager/view_manager_constants.mo
jom.h" | 16 #include "mojo/services/public/interfaces/view_manager/view_manager_constants.mo
jom.h" |
| 16 #include "third_party/skia/include/core/SkColor.h" | 17 #include "third_party/skia/include/core/SkColor.h" |
| 17 #include "ui/gfx/geometry/rect.h" | 18 #include "ui/gfx/geometry/rect.h" |
| 18 | 19 |
| 19 class SkBitmap; | 20 class SkBitmap; |
| 20 | 21 |
| 21 namespace mojo { | 22 namespace mojo { |
| 22 | 23 |
| 23 class ServiceProviderImpl; | 24 class ServiceProviderImpl; |
| 24 class View; | 25 class View; |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 void RemoveChild(View* child); | 63 void RemoveChild(View* child); |
| 63 | 64 |
| 64 void Reorder(View* relative, OrderDirection direction); | 65 void Reorder(View* relative, OrderDirection direction); |
| 65 void MoveToFront(); | 66 void MoveToFront(); |
| 66 void MoveToBack(); | 67 void MoveToBack(); |
| 67 | 68 |
| 68 bool Contains(View* child) const; | 69 bool Contains(View* child) const; |
| 69 | 70 |
| 70 View* GetChildById(Id id); | 71 View* GetChildById(Id id); |
| 71 | 72 |
| 73 void SetSurfaceId(SurfaceIdPtr id); |
| 74 |
| 72 // TODO(beng): temporary only. | 75 // TODO(beng): temporary only. |
| 73 void SetContents(const SkBitmap& contents); | 76 void SetContents(const SkBitmap& contents); |
| 74 void SetColor(SkColor color); | 77 void SetColor(SkColor color); |
| 75 | 78 |
| 76 // Focus. | 79 // Focus. |
| 77 void SetFocus(); | 80 void SetFocus(); |
| 78 | 81 |
| 79 // Embedding. | 82 // Embedding. |
| 80 void Embed(const String& url); | 83 void Embed(const String& url); |
| 81 scoped_ptr<ServiceProvider> Embed( | 84 scoped_ptr<ServiceProvider> Embed( |
| (...skipping 26 matching lines...) Expand all Loading... |
| 108 ObserverList<ViewObserver> observers_; | 111 ObserverList<ViewObserver> observers_; |
| 109 | 112 |
| 110 gfx::Rect bounds_; | 113 gfx::Rect bounds_; |
| 111 | 114 |
| 112 DISALLOW_COPY_AND_ASSIGN(View); | 115 DISALLOW_COPY_AND_ASSIGN(View); |
| 113 }; | 116 }; |
| 114 | 117 |
| 115 } // namespace mojo | 118 } // namespace mojo |
| 116 | 119 |
| 117 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_H_ | 120 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_H_ |
| OLD | NEW |