| Index: ui/aura/client/visibility_client.cc
|
| ===================================================================
|
| --- ui/aura/client/visibility_client.cc (revision 192570)
|
| +++ ui/aura/client/visibility_client.cc (working copy)
|
| @@ -14,15 +14,21 @@
|
|
|
| // A property key to store a client that handles window visibility changes.
|
| DEFINE_LOCAL_WINDOW_PROPERTY_KEY(
|
| - VisibilityClient*, kRootWindowVisibilityClientKey, NULL);
|
| + VisibilityClient*, kWindowVisibilityClientKey, NULL);
|
|
|
| -void SetVisibilityClient(RootWindow* root_window, VisibilityClient* client) {
|
| - root_window->SetProperty(kRootWindowVisibilityClientKey, client);
|
| +
|
| +void SetVisibilityClient(Window* window, VisibilityClient* client) {
|
| + window->SetProperty(kWindowVisibilityClientKey, client);
|
| }
|
|
|
| -VisibilityClient* GetVisibilityClient(RootWindow* root_window) {
|
| - return root_window ?
|
| - root_window->GetProperty(kRootWindowVisibilityClientKey) : NULL;
|
| +VisibilityClient* GetVisibilityClient(Window* window) {
|
| + VisibilityClient* visibility_client = NULL;
|
| + aura::Window* current = window;
|
| + do {
|
| + visibility_client = current->GetProperty(kWindowVisibilityClientKey);
|
| + current = current->parent();
|
| + } while (current && !visibility_client);
|
| + return visibility_client;
|
| }
|
|
|
| } // namespace client
|
|
|