diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-26 14:49:09 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-26 14:49:09 +0000 |
commit | 32c2a46c5f820f42cdb37b869e99633d8a2d73ad (patch) | |
tree | 9e09f67ffd197c2067a286e4e45927ee5c5aa429 /ui/aura/client | |
parent | 08f8feb39b2c8801dd39a1531fb5958644162e6d (diff) | |
download | chromium_src-32c2a46c5f820f42cdb37b869e99633d8a2d73ad.zip chromium_src-32c2a46c5f820f42cdb37b869e99633d8a2d73ad.tar.gz chromium_src-32c2a46c5f820f42cdb37b869e99633d8a2d73ad.tar.bz2 |
Migrate client API setters/getters to take a RootWindow.
http://crbug.com/112131
TEST=none
TBR=sky
Review URL: https://chromiumcodereview.appspot.com/9455081
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@123690 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/aura/client')
-rw-r--r-- | ui/aura/client/activation_client.cc | 10 | ||||
-rw-r--r-- | ui/aura/client/activation_client.h | 6 | ||||
-rw-r--r-- | ui/aura/client/dispatcher_client.cc | 8 | ||||
-rw-r--r-- | ui/aura/client/dispatcher_client.h | 7 | ||||
-rw-r--r-- | ui/aura/client/drag_drop_client.cc | 9 | ||||
-rw-r--r-- | ui/aura/client/drag_drop_client.h | 6 | ||||
-rw-r--r-- | ui/aura/client/tooltip_client.cc | 9 | ||||
-rw-r--r-- | ui/aura/client/tooltip_client.h | 6 | ||||
-rw-r--r-- | ui/aura/client/visibility_client.cc | 10 | ||||
-rw-r--r-- | ui/aura/client/visibility_client.h | 6 |
10 files changed, 44 insertions, 33 deletions
diff --git a/ui/aura/client/activation_client.cc b/ui/aura/client/activation_client.cc index 09e29f0..7ceb005 100644 --- a/ui/aura/client/activation_client.cc +++ b/ui/aura/client/activation_client.cc @@ -27,13 +27,13 @@ const WindowProperty<ActivationClient*>* const const WindowProperty<Window*>* const kRootWindowActiveWindowKey = &kRootWindowActiveWindowProp; -void SetActivationClient(ActivationClient* client) { - RootWindow::GetInstance()->SetProperty(kRootWindowActivationClientKey, - client); +void SetActivationClient(RootWindow* root_window, ActivationClient* client) { + root_window->SetProperty(kRootWindowActivationClientKey, client); } -ActivationClient* GetActivationClient() { - return RootWindow::GetInstance()->GetProperty(kRootWindowActivationClientKey); +ActivationClient* GetActivationClient(RootWindow* root_window) { + return root_window ? + root_window->GetProperty(kRootWindowActivationClientKey) : NULL; } } // namespace client diff --git a/ui/aura/client/activation_client.h b/ui/aura/client/activation_client.h index dcbe289..9893a34 100644 --- a/ui/aura/client/activation_client.h +++ b/ui/aura/client/activation_client.h @@ -10,6 +10,7 @@ #include "ui/aura/window.h" namespace aura { +class RootWindow; namespace client { // An interface implemented by an object that manages window activation. @@ -34,8 +35,9 @@ class AURA_EXPORT ActivationClient { }; // Sets/Gets the activation client on the RootWindow. -AURA_EXPORT void SetActivationClient(ActivationClient* client); -AURA_EXPORT ActivationClient* GetActivationClient(); +AURA_EXPORT void SetActivationClient(RootWindow* root_window, + ActivationClient* client); +AURA_EXPORT ActivationClient* GetActivationClient(RootWindow* root_window); // A property key to store what the client defines as the active window on the // RootWindow. diff --git a/ui/aura/client/dispatcher_client.cc b/ui/aura/client/dispatcher_client.cc index 56a2227..2fb71dd 100644 --- a/ui/aura/client/dispatcher_client.cc +++ b/ui/aura/client/dispatcher_client.cc @@ -20,12 +20,12 @@ const WindowProperty<DispatcherClient*>* const } // namespace -void SetDispatcherClient(DispatcherClient* client) { - RootWindow::GetInstance()->SetProperty(kDispatcherClientKey, client); +void SetDispatcherClient(RootWindow* root_window, DispatcherClient* client) { + root_window->SetProperty(kDispatcherClientKey, client); } -DispatcherClient* GetDispatcherClient() { - return RootWindow::GetInstance()->GetProperty(kDispatcherClientKey); +DispatcherClient* GetDispatcherClient(RootWindow* root_window) { + return root_window ? root_window->GetProperty(kDispatcherClientKey) : NULL; } } // namespace client diff --git a/ui/aura/client/dispatcher_client.h b/ui/aura/client/dispatcher_client.h index 88e4127..4abe298 100644 --- a/ui/aura/client/dispatcher_client.h +++ b/ui/aura/client/dispatcher_client.h @@ -11,7 +11,7 @@ #include "base/message_loop.h" namespace aura { - +class RootWindow; namespace client { // An interface implemented by an object which handles nested dispatchers. @@ -22,8 +22,9 @@ class AURA_EXPORT DispatcherClient { bool nestable_tasks_allowed) = 0; }; -AURA_EXPORT void SetDispatcherClient(DispatcherClient* client); -AURA_EXPORT DispatcherClient* GetDispatcherClient(); +AURA_EXPORT void SetDispatcherClient(RootWindow* root_window, + DispatcherClient* client); +AURA_EXPORT DispatcherClient* GetDispatcherClient(RootWindow* root_window); } // namespace client } // namespace aura diff --git a/ui/aura/client/drag_drop_client.cc b/ui/aura/client/drag_drop_client.cc index f7c0ff1..d89aef1 100644 --- a/ui/aura/client/drag_drop_client.cc +++ b/ui/aura/client/drag_drop_client.cc @@ -20,12 +20,13 @@ const WindowProperty<DragDropClient*>* const } // namespace -void SetDragDropClient(DragDropClient* client) { - RootWindow::GetInstance()->SetProperty(kRootWindowDragDropClientKey, client); +void SetDragDropClient(RootWindow* root_window, DragDropClient* client) { + root_window->SetProperty(kRootWindowDragDropClientKey, client); } -DragDropClient* GetDragDropClient() { - return RootWindow::GetInstance()->GetProperty(kRootWindowDragDropClientKey); +DragDropClient* GetDragDropClient(RootWindow* root_window) { + return root_window ? + root_window->GetProperty(kRootWindowDragDropClientKey) : NULL; } } // namespace client diff --git a/ui/aura/client/drag_drop_client.h b/ui/aura/client/drag_drop_client.h index 5e51221..58b00ed 100644 --- a/ui/aura/client/drag_drop_client.h +++ b/ui/aura/client/drag_drop_client.h @@ -14,6 +14,7 @@ class OSExchangeData; } namespace aura { +class RootWindow; class Window; namespace client { @@ -42,8 +43,9 @@ class AURA_EXPORT DragDropClient { virtual bool IsDragDropInProgress() = 0; }; -AURA_EXPORT void SetDragDropClient(DragDropClient* client); -AURA_EXPORT DragDropClient* GetDragDropClient(); +AURA_EXPORT void SetDragDropClient(RootWindow* root_window, + DragDropClient* client); +AURA_EXPORT DragDropClient* GetDragDropClient(RootWindow* root_window); } // namespace client } // namespace aura diff --git a/ui/aura/client/tooltip_client.cc b/ui/aura/client/tooltip_client.cc index 072336a..fab7499 100644 --- a/ui/aura/client/tooltip_client.cc +++ b/ui/aura/client/tooltip_client.cc @@ -25,12 +25,13 @@ const WindowProperty<string16*>* const kTooltipTextKey = &kTooltipTextProp; } // namespace -void SetTooltipClient(TooltipClient* client) { - RootWindow::GetInstance()->SetProperty(kRootWindowTooltipClientKey, client); +void SetTooltipClient(RootWindow* root_window, TooltipClient* client) { + root_window->SetProperty(kRootWindowTooltipClientKey, client); } -TooltipClient* GetTooltipClient() { - return RootWindow::GetInstance()->GetProperty(kRootWindowTooltipClientKey); +TooltipClient* GetTooltipClient(RootWindow* root_window) { + return root_window ? + root_window->GetProperty(kRootWindowTooltipClientKey) : NULL; } void SetTooltipText(Window* window, string16* tooltip_text) { diff --git a/ui/aura/client/tooltip_client.h b/ui/aura/client/tooltip_client.h index b99f329..5e68d82 100644 --- a/ui/aura/client/tooltip_client.h +++ b/ui/aura/client/tooltip_client.h @@ -11,6 +11,7 @@ #include "ui/gfx/font.h" namespace aura { +class RootWindow; class Window; namespace client { @@ -23,8 +24,9 @@ class AURA_EXPORT TooltipClient { virtual void SetTooltipsEnabled(bool enable) = 0; }; -AURA_EXPORT void SetTooltipClient(TooltipClient* client); -AURA_EXPORT TooltipClient* GetTooltipClient(); +AURA_EXPORT void SetTooltipClient(RootWindow* root_window, + TooltipClient* client); +AURA_EXPORT TooltipClient* GetTooltipClient(RootWindow* root_window); AURA_EXPORT void SetTooltipText(Window* window, string16* tooltip_text); AURA_EXPORT const string16 GetTooltipText(Window* window); diff --git a/ui/aura/client/visibility_client.cc b/ui/aura/client/visibility_client.cc index fdb9d9a..24f8dd6 100644 --- a/ui/aura/client/visibility_client.cc +++ b/ui/aura/client/visibility_client.cc @@ -21,13 +21,13 @@ const WindowProperty<VisibilityClient*>* const } // namespace -void SetVisibilityClient(VisibilityClient* client) { - RootWindow::GetInstance()->SetProperty(kRootWindowVisibilityClientKey, - client); +void SetVisibilityClient(RootWindow* root_window, VisibilityClient* client) { + root_window->SetProperty(kRootWindowVisibilityClientKey, client); } -VisibilityClient* GetVisibilityClient() { - return RootWindow::GetInstance()->GetProperty(kRootWindowVisibilityClientKey); +VisibilityClient* GetVisibilityClient(RootWindow* root_window) { + return root_window ? + root_window->GetProperty(kRootWindowVisibilityClientKey) : NULL; } } // namespace client diff --git a/ui/aura/client/visibility_client.h b/ui/aura/client/visibility_client.h index bde4ba5..4b28ffe 100644 --- a/ui/aura/client/visibility_client.h +++ b/ui/aura/client/visibility_client.h @@ -9,6 +9,7 @@ #include "ui/aura/aura_export.h" namespace aura { +class RootWindow; class Window; namespace client { @@ -26,8 +27,9 @@ class AURA_EXPORT VisibilityClient { }; // Sets/Gets the VisibilityClient on the RootWindow. -AURA_EXPORT void SetVisibilityClient(VisibilityClient* client); -AURA_EXPORT VisibilityClient* GetVisibilityClient(); +AURA_EXPORT void SetVisibilityClient(RootWindow* root_window, + VisibilityClient* client); +AURA_EXPORT VisibilityClient* GetVisibilityClient(RootWindow* root_window); } // namespace clients } // namespace aura |