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

Unified Diff: components/exo/wm_helper_ash.h

Issue 2250863003: exo: Run exo in mus+ash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix build errors Created 4 years, 4 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 | « components/exo/wm_helper.cc ('k') | components/exo/wm_helper_ash.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/exo/wm_helper_ash.h
diff --git a/components/exo/wm_helper_ash.h b/components/exo/wm_helper_ash.h
new file mode 100644
index 0000000000000000000000000000000000000000..fe12c0760f971c16bfc43d6a1643b80d5bc9ad4b
--- /dev/null
+++ b/components/exo/wm_helper_ash.h
@@ -0,0 +1,64 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_EXO_WM_HELPER_ASH_H_
+#define COMPONENTS_EXO_WM_HELPER_ASH_H_
+
+#include "ash/common/shell_observer.h"
+#include "base/macros.h"
+#include "components/exo/wm_helper.h"
+#include "ui/aura/client/cursor_client_observer.h"
+#include "ui/aura/client/focus_change_observer.h"
+#include "ui/wm/public/activation_change_observer.h"
+
+namespace exo {
+
+// A helper class for accessing WindowManager related features.
+class WMHelperAsh : public WMHelper,
+ public aura::client::ActivationChangeObserver,
+ public aura::client::FocusChangeObserver,
+ public aura::client::CursorClientObserver,
+ public ash::ShellObserver {
+ public:
+ WMHelperAsh();
+ ~WMHelperAsh() override;
+
+ // Overriden from WMHelper:
+ const ash::DisplayInfo GetDisplayInfo(int64_t display_id) const override;
+ aura::Window* GetContainer(int container_id) override;
+ aura::Window* GetActiveWindow() const override;
+ aura::Window* GetFocusedWindow() const override;
+ ui::CursorSetType GetCursorSet() const override;
+ void AddPreTargetHandler(ui::EventHandler* handler) override;
+ void PrependPreTargetHandler(ui::EventHandler* handler) override;
+ void RemovePreTargetHandler(ui::EventHandler* handler) override;
+ void AddPostTargetHandler(ui::EventHandler* handler) override;
+ void RemovePostTargetHandler(ui::EventHandler* handler) override;
+ bool IsMaximizeModeWindowManagerEnabled() const override;
+
+ // Overriden from aura::client::ActivationChangeObserver:
+ void OnWindowActivated(
+ aura::client::ActivationChangeObserver::ActivationReason reason,
+ aura::Window* gained_active,
+ aura::Window* lost_active) override;
+
+ // Overriden from aura::client::FocusChangeObserver:
+ void OnWindowFocused(aura::Window* gained_focus,
+ aura::Window* lost_focus) override;
+
+ // Overriden from aura::client::CursorClientObserver:
+ void OnCursorVisibilityChanged(bool is_visible) override;
+ void OnCursorSetChanged(ui::CursorSetType cursor_set) override;
+
+ // Overriden from ash::ShellObserver:
+ void OnMaximizeModeStarted() override;
+ void OnMaximizeModeEnded() override;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(WMHelperAsh);
+};
+
+} // namespace exo
+
+#endif // COMPONENTS_EXO_WM_HELPER_H_
« no previous file with comments | « components/exo/wm_helper.cc ('k') | components/exo/wm_helper_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698