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

Unified Diff: mojo/services/view_manager/connection_manager.h

Issue 721243003: Changes ViewManagerServiceImpl so that it no longer subclasses InterfaceImpl (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: format Created 6 years, 1 month 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: mojo/services/view_manager/connection_manager.h
diff --git a/mojo/services/view_manager/connection_manager.h b/mojo/services/view_manager/connection_manager.h
index 364ed19d9d2c2f4851ae4040bd020ed619387d15..c0edef654060d04a7952313769fdddf75a7c7feb 100644
--- a/mojo/services/view_manager/connection_manager.h
+++ b/mojo/services/view_manager/connection_manager.h
@@ -9,6 +9,7 @@
#include <set>
#include "base/basictypes.h"
+#include "base/memory/scoped_ptr.h"
#include "mojo/public/cpp/application/interface_factory.h"
#include "mojo/public/cpp/bindings/array.h"
#include "mojo/public/cpp/bindings/error_handler.h"
@@ -25,18 +26,17 @@ class ApplicationConnection;
namespace service {
+class ClientConnection;
class ConnectionManagerDelegate;
class ViewManagerServiceImpl;
class WindowManagerInternalClientImpl;
// ConnectionManager manages the set of connections to the ViewManager (all the
// ViewManagerServiceImpls) as well as providing the root of the hierarchy.
-class ConnectionManager
- : public ServerViewDelegate,
- public WindowManagerInternalClient,
- public InterfaceFactory<ViewManagerService>,
- public InterfaceFactory<WindowManagerInternalClient>,
- public ErrorHandler {
+class ConnectionManager : public ServerViewDelegate,
+ public WindowManagerInternalClient,
+ public InterfaceFactory<ViewManagerService>,
+ public InterfaceFactory<WindowManagerInternalClient> {
public:
// Create when a ViewManagerServiceImpl is about to make a change. Ensures
// clients are notified correctly.
@@ -79,7 +79,7 @@ class ConnectionManager
ConnectionSpecificId GetAndAdvanceNextConnectionId();
// Invoked when a ViewManagerServiceImpl's connection encounters an error.
- void OnConnectionError(ViewManagerServiceImpl* connection);
+ void OnConnectionError(ClientConnection* connection);
// See description of ViewManagerService::Embed() for details. This assumes
// |transport_view_id| is valid.
@@ -136,7 +136,7 @@ class ConnectionManager
void ProcessViewDeleted(const ViewId& view);
private:
- typedef std::map<ConnectionSpecificId, ViewManagerServiceImpl*> ConnectionMap;
+ typedef std::map<ConnectionSpecificId, ClientConnection*> ConnectionMap;
// Invoked when a connection is about to make a change. Subsequently followed
// by FinishChange() once the change is done.
@@ -155,7 +155,7 @@ class ConnectionManager
}
// Adds |connection| to internal maps.
- void AddConnection(ViewManagerServiceImpl* connection);
+ void AddConnection(ClientConnection* connection);
// Overridden from ServerViewDelegate:
void OnViewDestroyed(const ServerView* view) override;
@@ -190,17 +190,14 @@ class ConnectionManager
void Create(ApplicationConnection* connection,
InterfaceRequest<WindowManagerInternalClient> request) override;
- // ErrorHandler:
- void OnConnectionError() override;
-
ApplicationConnection* app_connection_;
ConnectionManagerDelegate* delegate_;
- // The ViewManager implementation provided to the initial connection (the
- // WindowManager).
- // NOTE: |window_manager_vm_service_| is also in |connection_map_|.
- ViewManagerServiceImpl* window_manager_vm_service_;
+ // The ClientConnection containing the ViewManagerService implementation
+ // provided to the initial connection (the WindowManager).
+ // NOTE: |window_manager_client_connection_| is also in |connection_map_|.
+ ClientConnection* window_manager_client_connection_;
// ID to use for next ViewManagerServiceImpl.
ConnectionSpecificId next_connection_id_;

Powered by Google App Engine
This is Rietveld 408576698