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

Unified Diff: mojo/services/view_manager/view_manager_service_impl.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/view_manager_service_impl.h
diff --git a/mojo/services/view_manager/view_manager_service_impl.h b/mojo/services/view_manager/view_manager_service_impl.h
index 967b766b0e79f854d9c865f0155c0c4f456890bc..b2f979ec37c634bf6db232128dc9a951c09ac46c 100644
--- a/mojo/services/view_manager/view_manager_service_impl.h
+++ b/mojo/services/view_manager/view_manager_service_impl.h
@@ -29,9 +29,8 @@ class ConnectionManager;
class ServerView;
// Manages a connection from the client.
msw 2014/11/14 01:42:18 nit: perhaps expand on this comment?
sky 2014/11/14 20:56:03 Done.
-class ViewManagerServiceImpl
- : public InterfaceImpl<ViewManagerService>,
- public AccessPolicyDelegate {
+class ViewManagerServiceImpl : public ViewManagerService,
+ public AccessPolicyDelegate {
public:
using ViewIdSet = base::hash_set<Id>;
@@ -42,14 +41,17 @@ class ViewManagerServiceImpl
const ViewId& root_id);
~ViewManagerServiceImpl() override;
- // Called after bound. |service_provider| is the ServiceProvider to pass to
- // the client via OnEmbed().
- void Init(InterfaceRequest<ServiceProvider> service_provider);
+ // |service_provider| is the ServiceProvider to pass to the client via
+ // OnEmbed().
+ void Init(ViewManagerClient* client,
+ InterfaceRequest<ServiceProvider> service_provider);
ConnectionSpecificId id() const { return id_; }
ConnectionSpecificId creator_id() const { return creator_id_; }
const std::string& url() const { return url_; }
+ ViewManagerClient* client() { return client_; }
+
// Returns the View with the specified id.
ServerView* GetView(const ViewId& id) {
return const_cast<ServerView*>(
@@ -92,11 +94,6 @@ class ViewManagerServiceImpl
void ProcessViewPropertiesChanged(const ServerView* view,
bool originated_change);
- // TODO(sky): move this to private section (currently can't because of
- // bindings).
- // InterfaceImp overrides:
- void OnConnectionError() override;
-
private:
typedef std::map<ConnectionSpecificId, ServerView*> ViewMap;
@@ -202,6 +199,8 @@ class ViewManagerServiceImpl
// The URL of the app that embedded the app this connection was created for.
const std::string creator_url_;
+ ViewManagerClient* client_;
+
scoped_ptr<AccessPolicy> access_policy_;
// The views created by this connection. This connection owns these objects.

Powered by Google App Engine
This is Rietveld 408576698