| OLD | NEW |
| 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_VIEWS_WIDGET_DESKTOP_AURA_X11_DESKTOP_HANDLER_H_ | 5 #ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_X11_DESKTOP_HANDLER_H_ |
| 6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_X11_DESKTOP_HANDLER_H_ | 6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_X11_DESKTOP_HANDLER_H_ |
| 7 | 7 |
| 8 #include <X11/Xlib.h> | 8 #include <X11/Xlib.h> |
| 9 // Get rid of a macro from Xlib.h that conflicts with Aura's RootWindow class. | 9 // Get rid of a macro from Xlib.h that conflicts with Aura's RootWindow class. |
| 10 #undef RootWindow | 10 #undef RootWindow |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 // key press on a Chrome window. | 34 // key press on a Chrome window. |
| 35 int wm_user_time_ms() const { | 35 int wm_user_time_ms() const { |
| 36 return wm_user_time_ms_; | 36 return wm_user_time_ms_; |
| 37 } | 37 } |
| 38 void set_wm_user_time_ms(unsigned long time_ms) { | 38 void set_wm_user_time_ms(unsigned long time_ms) { |
| 39 wm_user_time_ms_ = time_ms; | 39 wm_user_time_ms_ = time_ms; |
| 40 } | 40 } |
| 41 | 41 |
| 42 // Sends a request to the window manager to activate |window|. | 42 // Sends a request to the window manager to activate |window|. |
| 43 // This method should only be called if the window is already mapped. | 43 // This method should only be called if the window is already mapped. |
| 44 void ActivateWindow(::Window window); | 44 void ActivateWindow(::Window window, bool for_user_gesture); |
| 45 | 45 |
| 46 // Attempts to get the window manager to deactivate |window| by moving it to | 46 // Attempts to get the window manager to deactivate |window| by moving it to |
| 47 // the bottom of the stack. Regardless of whether |window| was actually | 47 // the bottom of the stack. Regardless of whether |window| was actually |
| 48 // deactivated, sets the window as inactive in our internal state. | 48 // deactivated, sets the window as inactive in our internal state. |
| 49 void DeactivateWindow(::Window window); | 49 void DeactivateWindow(::Window window); |
| 50 | 50 |
| 51 // Checks if the current active window is |window|. | 51 // Checks if the current active window is |window|. |
| 52 bool IsActiveWindow(::Window window) const; | 52 bool IsActiveWindow(::Window window) const; |
| 53 | 53 |
| 54 // Processes activation/focus related events. Some of these events are | 54 // Processes activation/focus related events. Some of these events are |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 ui::X11AtomCache atom_cache_; | 100 ui::X11AtomCache atom_cache_; |
| 101 | 101 |
| 102 bool wm_supports_active_window_; | 102 bool wm_supports_active_window_; |
| 103 | 103 |
| 104 DISALLOW_COPY_AND_ASSIGN(X11DesktopHandler); | 104 DISALLOW_COPY_AND_ASSIGN(X11DesktopHandler); |
| 105 }; | 105 }; |
| 106 | 106 |
| 107 } // namespace views | 107 } // namespace views |
| 108 | 108 |
| 109 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_X11_DESKTOP_HANDLER_H_ | 109 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_X11_DESKTOP_HANDLER_H_ |
| OLD | NEW |