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

Side by Side Diff: mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.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_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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 void Reorder(Id view_id, Id relative_view_id, OrderDirection direction); 50 void Reorder(Id view_id, Id relative_view_id, OrderDirection direction);
51 51
52 // Returns true if the specified view was created by this connection. 52 // Returns true if the specified view was created by this connection.
53 bool OwnsView(Id id) const; 53 bool OwnsView(Id id) const;
54 54
55 void SetBounds(Id view_id, const gfx::Rect& bounds); 55 void SetBounds(Id view_id, const gfx::Rect& bounds);
56 void SetSurfaceId(Id view_id, SurfaceIdPtr surface_id); 56 void SetSurfaceId(Id view_id, SurfaceIdPtr surface_id);
57 // TODO(jamesr): Remove once all callers switch from SetContents to 57 // TODO(jamesr): Remove once all callers switch from SetContents to
58 // SetSurfaceId. 58 // SetSurfaceId.
59 void SetViewContents(Id view_id, const SkBitmap& contents); 59 void SetViewContents(Id view_id, const SkBitmap& contents);
60 void SetViewColor(Id view_id, SkColor color);
60 void SetFocus(Id view_id); 61 void SetFocus(Id view_id);
61 void SetVisible(Id view_id, bool visible); 62 void SetVisible(Id view_id, bool visible);
62 63
63 void Embed(const String& url, Id view_id); 64 void Embed(const String& url, Id view_id);
64 void Embed(const String& url, 65 void Embed(const String& url,
65 Id view_id, 66 Id view_id,
66 ServiceProviderPtr service_provider); 67 ServiceProviderPtr service_provider);
67 68
68 void set_change_acked_callback(const base::Callback<void(void)>& callback) { 69 void set_change_acked_callback(const base::Callback<void(void)>& callback) {
69 change_acked_callback_ = callback; 70 change_acked_callback_ = callback;
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 virtual void OnFocusChanged(Id old_focused_view_id, 127 virtual void OnFocusChanged(Id old_focused_view_id,
127 Id new_focused_view_id) OVERRIDE; 128 Id new_focused_view_id) OVERRIDE;
128 virtual void OnActiveWindowChanged(Id old_focused_window, 129 virtual void OnActiveWindowChanged(Id old_focused_window,
129 Id new_focused_window) OVERRIDE; 130 Id new_focused_window) OVERRIDE;
130 131
131 void RemoveRoot(View* root); 132 void RemoveRoot(View* root);
132 133
133 void OnActionCompleted(bool success); 134 void OnActionCompleted(bool success);
134 void OnActionCompletedWithErrorCode(ErrorCode code); 135 void OnActionCompletedWithErrorCode(ErrorCode code);
135 136
137 BitmapUploader* BitmapUploaderForView(Id view_id);
138
136 base::Callback<void(bool)> ActionCompletedCallback(); 139 base::Callback<void(bool)> ActionCompletedCallback();
137 base::Callback<void(ErrorCode)> ActionCompletedCallbackWithErrorCode(); 140 base::Callback<void(ErrorCode)> ActionCompletedCallbackWithErrorCode();
138 141
139 bool connected_; 142 bool connected_;
140 ConnectionSpecificId connection_id_; 143 ConnectionSpecificId connection_id_;
141 ConnectionSpecificId next_id_; 144 ConnectionSpecificId next_id_;
142 145
143 std::string creator_url_; 146 std::string creator_url_;
144 147
145 base::Callback<void(void)> change_acked_callback_; 148 base::Callback<void(void)> change_acked_callback_;
146 149
147 ViewManagerDelegate* delegate_; 150 ViewManagerDelegate* delegate_;
148 WindowManagerDelegate* window_manager_delegate_; 151 WindowManagerDelegate* window_manager_delegate_;
149 152
150 std::vector<View*> roots_; 153 std::vector<View*> roots_;
151 154
152 IdToViewMap views_; 155 IdToViewMap views_;
153 156
154 ViewManagerService* service_; 157 ViewManagerService* service_;
155 158
156 WindowManagerServicePtr window_manager_; 159 WindowManagerServicePtr window_manager_;
157 160
158 // TODO(jamesr): Remove once all callers switch from SetContents to 161 // TODO(jamesr): Remove once all callers switch from SetContents to
159 // SetSurfaceId. 162 // SetSurfaceId.
160 Shell* shell_; 163 Shell* shell_;
161 scoped_ptr<BitmapUploader> bitmap_uploader_; 164 typedef std::map<Id, BitmapUploader*> BitmapUploaderMap;
165 BitmapUploaderMap bitmap_uploaders_;
162 166
163 DISALLOW_COPY_AND_ASSIGN(ViewManagerClientImpl); 167 DISALLOW_COPY_AND_ASSIGN(ViewManagerClientImpl);
164 }; 168 };
165 169
166 } // namespace mojo 170 } // namespace mojo
167 171
168 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_MANAGER_CLIENT_IMPL_H_ 172 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_MANAGER_CLIENT_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698