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

Unified Diff: trunk/src/mojo/services/public/cpp/view_manager/lib/view_manager_synchronizer.h

Issue 306403003: Revert 274322 "Implement a demo that shows one app embedding ren..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: trunk/src/mojo/services/public/cpp/view_manager/lib/view_manager_synchronizer.h
===================================================================
--- trunk/src/mojo/services/public/cpp/view_manager/lib/view_manager_synchronizer.h (revision 274327)
+++ trunk/src/mojo/services/public/cpp/view_manager/lib/view_manager_synchronizer.h (working copy)
@@ -15,6 +15,10 @@
class SkBitmap;
+namespace base {
+class RunLoop;
+}
+
namespace mojo {
namespace view_manager {
@@ -22,7 +26,7 @@
class ViewManagerTransaction;
// Manages the connection with the View Manager service.
-class ViewManagerSynchronizer : public InterfaceImpl<IViewManagerClient> {
+class ViewManagerSynchronizer : public IViewManagerClient {
public:
explicit ViewManagerSynchronizer(ViewManager* view_manager);
virtual ~ViewManagerSynchronizer();
@@ -50,8 +54,6 @@
void SetBounds(TransportNodeId node_id, const gfx::Rect& bounds);
void SetViewContents(TransportViewId view_id, const SkBitmap& contents);
- void Embed(const String& url, TransportNodeId node_id);
-
void set_changes_acked_callback(const base::Callback<void(void)>& callback) {
changes_acked_callback_ = callback;
}
@@ -63,9 +65,6 @@
friend class ViewManagerTransaction;
typedef ScopedVector<ViewManagerTransaction> Transactions;
- // Overridden from InterfaceImpl:
- virtual void OnConnectionEstablished() OVERRIDE;
-
// Overridden from IViewManagerClient:
virtual void OnViewManagerConnectionEstablished(
TransportConnectionId connection_id,
@@ -97,9 +96,7 @@
// front of the queue.
void RemoveFromPendingQueue(ViewManagerTransaction* transaction);
- ViewManager* view_manager() { return view_manager_.get(); }
-
- scoped_ptr<ViewManager> view_manager_;
+ ViewManager* view_manager_;
bool connected_;
TransportConnectionId connection_id_;
uint16_t next_id_;
@@ -109,9 +106,13 @@
base::WeakPtrFactory<ViewManagerSynchronizer> sync_factory_;
+ // Non-NULL while blocking on the connection to |service_| during
+ // construction.
+ base::RunLoop* init_loop_;
+
base::Callback<void(void)> changes_acked_callback_;
- IViewManager* service_;
+ IViewManagerPtr service_;
DISALLOW_COPY_AND_ASSIGN(ViewManagerSynchronizer);
};

Powered by Google App Engine
This is Rietveld 408576698