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

Unified Diff: ui/wm/public/activation_client.h

Issue 2821213002: chromeos: converts ash devtools to aura::Window (Closed)
Patch Set: fix cast Created 3 years, 8 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 | « ui/wm/core/window_util.cc ('k') | ui/wm/public/activation_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/wm/public/activation_client.h
diff --git a/ui/wm/public/activation_client.h b/ui/wm/public/activation_client.h
index 0607ea1efbecce05bb77998dcf6e5d981d243750..401ceb559ef0de44ac4f7777e600fde94541b06f 100644
--- a/ui/wm/public/activation_client.h
+++ b/ui/wm/public/activation_client.h
@@ -28,7 +28,11 @@ class AURA_EXPORT ActivationClient {
virtual void DeactivateWindow(Window* window) = 0;
// Retrieves the active window, or NULL if there is none.
- virtual Window* GetActiveWindow() = 0;
+ Window* GetActiveWindow() {
+ return const_cast<Window*>(
+ const_cast<const ActivationClient*>(this)->GetActiveWindow());
+ }
+ virtual const Window* GetActiveWindow() const = 0;
alokp 2017/04/18 16:57:29 non-owner nit: I personally find *const* interface
sky 2017/04/18 17:16:05 This function is intended to be a trivial getter,
alokp 2017/04/18 18:48:33 Which is what I meant by making assumptions about
sky 2017/04/18 19:08:13 IsActiveWindow() requires the ActivationClient, wh
// Retrieves the activatable window for |window|, or NULL if there is none.
// Note that this is often but not always the toplevel window (see
@@ -52,6 +56,8 @@ class AURA_EXPORT ActivationClient {
AURA_EXPORT void SetActivationClient(Window* root_window,
ActivationClient* client);
AURA_EXPORT ActivationClient* GetActivationClient(Window* root_window);
+AURA_EXPORT const ActivationClient* GetActivationClient(
+ const Window* root_window);
// Some types of transient window are only visible when active.
// The transient parents of these windows may have visual appearance properties
« no previous file with comments | « ui/wm/core/window_util.cc ('k') | ui/wm/public/activation_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698