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

Unified Diff: mojo/services/window_manager/window_manager_app.h

Issue 636363002: Splits window manager like methods into ViewManagerServiceDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge 2 trunk Created 6 years, 2 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
« no previous file with comments | « mojo/services/window_manager/main.cc ('k') | mojo/services/window_manager/window_manager_app.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/window_manager/window_manager_app.h
diff --git a/mojo/services/window_manager/window_manager_app.h b/mojo/services/window_manager/window_manager_app.h
index 5b7ccb52812f68770402204a86b7e0eea5490768..8c9c2443b4413ff9d73e107badf883b0af122e75 100644
--- a/mojo/services/window_manager/window_manager_app.h
+++ b/mojo/services/window_manager/window_manager_app.h
@@ -16,7 +16,7 @@
#include "mojo/services/public/cpp/view_manager/view_manager_client_factory.h"
#include "mojo/services/public/cpp/view_manager/view_manager_delegate.h"
#include "mojo/services/public/cpp/view_manager/view_observer.h"
-#include "mojo/services/public/cpp/view_manager/window_manager_delegate.h"
+#include "mojo/services/window_manager/window_manager_service2_impl.h"
#include "mojo/services/window_manager/window_manager_service_impl.h"
#include "ui/aura/client/focus_change_observer.h"
#include "ui/events/event_handler.h"
@@ -39,8 +39,9 @@ namespace mojo {
class AuraInit;
class DummyDelegate;
-class WindowManagerServiceImpl;
-class WindowTreeHostMojo;
+class WindowManagerClient;
+class WindowManagerDelegate;
+class WindowManagerService2Impl;
// Implements core window manager functionality that could conceivably be shared
// across multiple window managers implementing superficially different user
@@ -56,7 +57,6 @@ class WindowTreeHostMojo;
class WindowManagerApp
: public ApplicationDelegate,
public ViewManagerDelegate,
- public WindowManagerDelegate,
public ViewObserver,
public ui::EventHandler,
public aura::client::FocusChangeObserver,
@@ -70,8 +70,8 @@ class WindowManagerApp
aura::Window* GetWindowForViewId(Id view);
// Register/deregister new connections to the window manager service.
- void AddConnection(WindowManagerServiceImpl* connection);
- void RemoveConnection(WindowManagerServiceImpl* connection);
+ void AddConnection(WindowManagerService2Impl* connection);
+ void RemoveConnection(WindowManagerService2Impl* connection);
// These are canonical implementations of the window manager API methods.
void SetCapture(Id view);
@@ -82,17 +82,25 @@ class WindowManagerApp
// A client of this object will use this accessor to gain access to the
// aura::Window hierarchy and attach event handlers.
- aura::WindowTreeHost* host() { return window_tree_host_.get(); }
+ WindowTreeHostMojo* host() { return window_tree_host_.get(); }
+
+ WindowManagerDelegate* window_manager_delegate() {
+ return window_manager_delegate_;
+ }
void InitFocus(wm::FocusRules* rules);
+ void set_window_manager_client(WindowManagerClient* client) {
+ window_manager_client_ = client;
+ }
+
// Overridden from ApplicationDelegate:
virtual void Initialize(ApplicationImpl* impl) override;
virtual bool ConfigureIncomingConnection(
ApplicationConnection* connection) override;
private:
- typedef std::set<WindowManagerServiceImpl*> Connections;
+ typedef std::set<WindowManagerService2Impl*> Connections;
typedef std::map<Id, aura::Window*> ViewIdToWindowMap;
// Overridden from ViewManagerDelegate:
@@ -102,12 +110,6 @@ class WindowManagerApp
scoped_ptr<ServiceProvider> imported_services) override;
virtual void OnViewManagerDisconnected(ViewManager* view_manager) override;
- // Overridden from WindowManagerDelegate:
- virtual void Embed(
- const String& url,
- InterfaceRequest<ServiceProvider> service_provider) override;
- virtual void DispatchEvent(EventPtr event) override;
-
// Overridden from ViewObserver:
virtual void OnTreeChanged(
const ViewObserver::TreeChangeParams& params) override;
@@ -140,11 +142,14 @@ class WindowManagerApp
Shell* shell_;
+ InterfaceFactoryImplWithContext<WindowManagerService2Impl, WindowManagerApp>
+ window_manager_service2_factory_;
+
InterfaceFactoryImplWithContext<WindowManagerServiceImpl, WindowManagerApp>
window_manager_service_factory_;
ViewManagerDelegate* wrapped_view_manager_delegate_;
- WindowManagerDelegate* wrapped_window_manager_delegate_;
+ WindowManagerDelegate* window_manager_delegate_;
ViewManager* view_manager_;
scoped_ptr<ViewManagerClientFactory> view_manager_client_factory_;
@@ -162,6 +167,8 @@ class WindowManagerApp
scoped_ptr<DummyDelegate> dummy_delegate_;
+ WindowManagerClient* window_manager_client_;
+
DISALLOW_COPY_AND_ASSIGN(WindowManagerApp);
};
« no previous file with comments | « mojo/services/window_manager/main.cc ('k') | mojo/services/window_manager/window_manager_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698