Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(346)

Side by Side Diff: mojo/services/public/cpp/view_manager/view.h

Issue 555953007: Fixes for surfaces bindings exposed by wm_flow app (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/surfaces/surface_id.mojom.h"
16 #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"
17 #include "third_party/skia/include/core/SkColor.h" 17 #include "third_party/skia/include/core/SkColor.h"
18 #include "ui/gfx/geometry/rect.h" 18 #include "ui/gfx/geometry/rect.h"
19 19
20 class SkBitmap; 20 class SkBitmap;
21 21
22 namespace mojo { 22 namespace mojo {
23 23
24 class BitmapUploader;
24 class ServiceProviderImpl; 25 class ServiceProviderImpl;
25 class View; 26 class View;
26 class ViewManager; 27 class ViewManager;
27 class ViewObserver; 28 class ViewObserver;
28 29
29 // Views are owned by the ViewManager. 30 // Views are owned by the ViewManager.
30 // TODO(beng): Right now, you'll have to implement a ViewObserver to track 31 // TODO(beng): Right now, you'll have to implement a ViewObserver to track
31 // destruction and NULL any pointers you have. 32 // destruction and NULL any pointers you have.
32 // Investigate some kind of smart pointer or weak pointer for these. 33 // Investigate some kind of smart pointer or weak pointer for these.
33 class View { 34 class View {
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 friend class ViewManagerClientImpl; 98 friend class ViewManagerClientImpl;
98 99
99 explicit View(ViewManager* manager); 100 explicit View(ViewManager* manager);
100 101
101 void LocalDestroy(); 102 void LocalDestroy();
102 void LocalAddChild(View* child); 103 void LocalAddChild(View* child);
103 void LocalRemoveChild(View* child); 104 void LocalRemoveChild(View* child);
104 // Returns true if the order actually changed. 105 // Returns true if the order actually changed.
105 bool LocalReorder(View* relative, OrderDirection direction); 106 bool LocalReorder(View* relative, OrderDirection direction);
106 void LocalSetBounds(const gfx::Rect& old_bounds, const gfx::Rect& new_bounds); 107 void LocalSetBounds(const gfx::Rect& old_bounds, const gfx::Rect& new_bounds);
108 void CreateBitmapUploader();
107 109
108 ViewManager* manager_; 110 ViewManager* manager_;
109 Id id_; 111 Id id_;
110 View* parent_; 112 View* parent_;
111 Children children_; 113 Children children_;
112 114
113 ObserverList<ViewObserver> observers_; 115 ObserverList<ViewObserver> observers_;
114 116
115 gfx::Rect bounds_; 117 gfx::Rect bounds_;
118 // TODO(jamesr): Temporary, remove when all clients are using surfaces
119 // directly.
120 scoped_ptr<BitmapUploader> bitmap_uploader_;
116 121
117 DISALLOW_COPY_AND_ASSIGN(View); 122 DISALLOW_COPY_AND_ASSIGN(View);
118 }; 123 };
119 124
120 } // namespace mojo 125 } // namespace mojo
121 126
122 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_H_ 127 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_H_
OLDNEW
« no previous file with comments | « mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.cc ('k') | mojo/services/view_manager/display_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698