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

Unified Diff: ash/wm/screen_pinning_controller.h

Issue 2777103005: Using WmDisplayObserver in ScreenPinningController. (Closed)
Patch Set: Created 3 years, 9 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 | « ash/shell.cc ('k') | ash/wm/screen_pinning_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/screen_pinning_controller.h
diff --git a/ash/wm/screen_pinning_controller.h b/ash/wm/screen_pinning_controller.h
index ac772ad10e9421c11ce94615767b5eb504f33ebf..401a7e96d76b51326079c6503bcb0fd4cc4066a1 100644
--- a/ash/wm/screen_pinning_controller.h
+++ b/ash/wm/screen_pinning_controller.h
@@ -8,7 +8,7 @@
#include <memory>
#include <vector>
-#include "ash/display/window_tree_host_manager.h"
+#include "ash/common/wm_display_observer.h"
#include "base/macros.h"
namespace aura {
@@ -18,7 +18,6 @@ class Window;
namespace ash {
class WindowDimmer;
-class WindowTreeHostManager;
class WmWindow;
template <typename UserData>
@@ -31,10 +30,9 @@ class WindowUserData;
// Android, or a single-purpose or kiosk application."
// https://developer.android.com/about/versions/android-5.0.html#ScreenPinning
// See also ArcKioskAppLauncher::CheckAndPinWindow().
-class ScreenPinningController : public WindowTreeHostManager::Observer {
+class ScreenPinningController : public WmDisplayObserver {
public:
- explicit ScreenPinningController(
- WindowTreeHostManager* window_tree_host_manager);
+ ScreenPinningController();
~ScreenPinningController() override;
// Sets a pinned window. It is not allowed to call this when there already
@@ -84,7 +82,7 @@ class ScreenPinningController : public WindowTreeHostManager::Observer {
// Returns the window from WindowDimmer.
WmWindow* CreateWindowDimmer(WmWindow* container);
- // WindowTreeHostManager::Observer:
+ // WmDisplayObserver:
void OnDisplayConfigurationChanged() override;
// Pinned window should be on top in the parent window.
@@ -98,11 +96,6 @@ class ScreenPinningController : public WindowTreeHostManager::Observer {
// Set true only when restacking done by this controller.
bool in_restacking_ = false;
- // Keep references to remove this as a observer.
- // While this controller is alive, it needs to be ensured that the instances
- // refered from the pointers should be alive.
- WindowTreeHostManager* window_tree_host_manager_;
-
// Window observers to translate events for the window to this controller.
std::unique_ptr<PinnedContainerWindowObserver>
pinned_container_window_observer_;
« no previous file with comments | « ash/shell.cc ('k') | ash/wm/screen_pinning_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698