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

Side by Side Diff: ui/aura/client/activation_client.h

Issue 9719037: Aura: Add non-browser windows into the list of "Alt + Tab" cycle list. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review fix Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_AURA_CLIENT_ACTIVATION_CLIENT_H_ 5 #ifndef UI_AURA_CLIENT_ACTIVATION_CLIENT_H_
6 #define UI_AURA_CLIENT_ACTIVATION_CLIENT_H_ 6 #define UI_AURA_CLIENT_ACTIVATION_CLIENT_H_
7 #pragma once 7 #pragma once
8 8
9 #include "ui/aura/aura_export.h" 9 #include "ui/aura/aura_export.h"
10 #include "ui/aura/window.h" 10 #include "ui/aura/window.h"
(...skipping 15 matching lines...) Expand all
26 // client. If |window| is NULL, nothing happens. 26 // client. If |window| is NULL, nothing happens.
27 virtual void DeactivateWindow(Window* window) = 0; 27 virtual void DeactivateWindow(Window* window) = 0;
28 28
29 // Retrieves the active window, or NULL if there is none. 29 // Retrieves the active window, or NULL if there is none.
30 virtual aura::Window* GetActiveWindow() = 0; 30 virtual aura::Window* GetActiveWindow() = 0;
31 31
32 // Invoked prior to |window| getting focus as a result of the |event|. |event| 32 // Invoked prior to |window| getting focus as a result of the |event|. |event|
33 // may be NULL. Returning false blocks |window| from getting focus. 33 // may be NULL. Returning false blocks |window| from getting focus.
34 virtual bool OnWillFocusWindow(Window* window, const Event* event) = 0; 34 virtual bool OnWillFocusWindow(Window* window, const Event* event) = 0;
35 35
36 // Returns true if |window| can be activated, false otherwise. If |window| has
37 // a modal child it can not be activated.
38 virtual bool CanActivateWindow(Window* window) const = 0;
39
36 protected: 40 protected:
37 virtual ~ActivationClient() {} 41 virtual ~ActivationClient() {}
38 }; 42 };
39 43
40 // Sets/Gets the activation client on the RootWindow. 44 // Sets/Gets the activation client on the RootWindow.
41 AURA_EXPORT void SetActivationClient(RootWindow* root_window, 45 AURA_EXPORT void SetActivationClient(RootWindow* root_window,
42 ActivationClient* client); 46 ActivationClient* client);
43 AURA_EXPORT ActivationClient* GetActivationClient(RootWindow* root_window); 47 AURA_EXPORT ActivationClient* GetActivationClient(RootWindow* root_window);
44 48
45 // A property key to store what the client defines as the active window on the 49 // A property key to store what the client defines as the active window on the
46 // RootWindow. 50 // RootWindow.
47 AURA_EXPORT extern const WindowProperty<Window*>* const 51 AURA_EXPORT extern const WindowProperty<Window*>* const
48 kRootWindowActiveWindowKey; 52 kRootWindowActiveWindowKey;
49 53
50 // Some types of transient window are only visible when active. 54 // Some types of transient window are only visible when active.
51 // The transient parents of these windows may have visual appearance properties 55 // The transient parents of these windows may have visual appearance properties
52 // that differ from transient parents that can be deactivated. 56 // that differ from transient parents that can be deactivated.
53 // The presence of this property implies these traits. 57 // The presence of this property implies these traits.
54 // TODO(beng): currently the UI framework (views) implements the actual 58 // TODO(beng): currently the UI framework (views) implements the actual
55 // close-on-deactivate component of this feature but it should be 59 // close-on-deactivate component of this feature but it should be
56 // possible to implement in the aura client. 60 // possible to implement in the aura client.
57 AURA_EXPORT void SetHideOnDeactivate(Window* window, bool hide_on_deactivate); 61 AURA_EXPORT void SetHideOnDeactivate(Window* window, bool hide_on_deactivate);
58 AURA_EXPORT bool GetHideOnDeactivate(Window* window); 62 AURA_EXPORT bool GetHideOnDeactivate(Window* window);
59 63
60 } // namespace clients 64 } // namespace clients
61 } // namespace aura 65 } // namespace aura
62 66
63 #endif // UI_AURA_CLIENT_ACTIVATION_CLIENT_H_ 67 #endif // UI_AURA_CLIENT_ACTIVATION_CLIENT_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/ash/chrome_shell_delegate.cc ('k') | ui/aura/test/test_activation_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698