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

Unified Diff: ash/common/wm/maximize_mode/maximize_mode_controller.h

Issue 2579703003: Using ShellObserver instead of creating MaximizeModeController::Observer (Closed)
Patch Set: Created 4 years 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 | « no previous file | ash/common/wm/maximize_mode/maximize_mode_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/wm/maximize_mode/maximize_mode_controller.h
diff --git a/ash/common/wm/maximize_mode/maximize_mode_controller.h b/ash/common/wm/maximize_mode/maximize_mode_controller.h
index e516c3bb6d98c0e2aac6108bef2cebdd70e2df76..37fd472a99ec550cfc2402899692d48c581f3be7 100644
--- a/ash/common/wm/maximize_mode/maximize_mode_controller.h
+++ b/ash/common/wm/maximize_mode/maximize_mode_controller.h
@@ -13,7 +13,6 @@
#include "ash/public/interfaces/touch_view.mojom.h"
#include "base/compiler_specific.h"
#include "base/macros.h"
-#include "base/observer_list.h"
#include "base/time/time.h"
#include "mojo/public/cpp/bindings/binding_set.h"
#include "mojo/public/cpp/bindings/interface_ptr_set.h"
@@ -57,25 +56,9 @@ class ASH_EXPORT MaximizeModeController :
public ShellObserver,
public WmDisplayObserver {
public:
- // Interface for observing changes from MaximizeModeController.
- class Observer {
- public:
- virtual ~Observer() {}
-
- // Called when device enters maximize mode.
- virtual void OnEnterMaximizeMode() {}
-
- // Called when device leaves maximize mode.
- virtual void OnLeaveMaximizeMode() {}
- };
-
MaximizeModeController();
~MaximizeModeController() override;
- // Adds and removes the |observer|.
- void AddObserver(Observer* observer);
- void RemoveObserver(Observer* observer);
-
// True if it is possible to enter maximize mode in the current
// configuration. If this returns false, it should never be the case that
// maximize mode becomes enabled.
@@ -210,9 +193,7 @@ class ASH_EXPORT MaximizeModeController :
mojo::BindingSet<mojom::TouchViewManager> bindings_;
// The set of touchview observers to be notified about mode changes.
- mojo::InterfacePtrSet<mojom::TouchViewObserver> touchview_observers_;
-
- base::ObserverList<Observer> observers_;
+ mojo::InterfacePtrSet<mojom::TouchViewObserver> observers_;
DISALLOW_COPY_AND_ASSIGN(MaximizeModeController);
};
« no previous file with comments | « no previous file | ash/common/wm/maximize_mode/maximize_mode_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698