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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_window_tree_host_win.h

Issue 297123002: API proposal for chrome.app.window to intercept all keys. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Return if there is no windows with keyboard focus. Created 6 years, 4 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
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_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_WIN_H_ 5 #ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_WIN_H_
6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_WIN_H_ 6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_WIN_H_
7 7
8 #include "ui/aura/window_tree_host.h" 8 #include "ui/aura/window_tree_host.h"
9 #include "ui/views/views_export.h" 9 #include "ui/views/views_export.h"
10 #include "ui/views/widget/desktop_aura/desktop_window_tree_host.h" 10 #include "ui/views/widget/desktop_aura/desktop_window_tree_host.h"
11 #include "ui/views/win/hwnd_message_handler_delegate.h" 11 #include "ui/views/win/hwnd_message_handler_delegate.h"
12 #include "ui/wm/public/animation_host.h" 12 #include "ui/wm/public/animation_host.h"
13 13
14 namespace aura { 14 namespace aura {
15 namespace client { 15 namespace client {
16 class DragDropClient; 16 class DragDropClient;
17 class FocusClient; 17 class FocusClient;
18 class ScopedTooltipDisabler; 18 class ScopedTooltipDisabler;
19 } 19 }
20 } 20 }
21 21
22 namespace views { 22 namespace views {
23 class DesktopCursorClient; 23 class DesktopCursorClient;
24 class DesktopDragDropClientWin; 24 class DesktopDragDropClientWin;
25 class DesktopKeyboardCaptureWin;
25 class HWNDMessageHandler; 26 class HWNDMessageHandler;
26 27
27 namespace corewm { 28 namespace corewm {
28 class TooltipWin; 29 class TooltipWin;
29 } 30 }
30 31
31 class VIEWS_EXPORT DesktopWindowTreeHostWin 32 class VIEWS_EXPORT DesktopWindowTreeHostWin
32 : public DesktopWindowTreeHost, 33 : public DesktopWindowTreeHost,
33 public aura::client::AnimationHost, 34 public aura::client::AnimationHost,
34 public aura::WindowTreeHost, 35 public aura::WindowTreeHost,
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 virtual void Activate() OVERRIDE; 73 virtual void Activate() OVERRIDE;
73 virtual void Deactivate() OVERRIDE; 74 virtual void Deactivate() OVERRIDE;
74 virtual bool IsActive() const OVERRIDE; 75 virtual bool IsActive() const OVERRIDE;
75 virtual void Maximize() OVERRIDE; 76 virtual void Maximize() OVERRIDE;
76 virtual void Minimize() OVERRIDE; 77 virtual void Minimize() OVERRIDE;
77 virtual void Restore() OVERRIDE; 78 virtual void Restore() OVERRIDE;
78 virtual bool IsMaximized() const OVERRIDE; 79 virtual bool IsMaximized() const OVERRIDE;
79 virtual bool IsMinimized() const OVERRIDE; 80 virtual bool IsMinimized() const OVERRIDE;
80 virtual bool HasCapture() const OVERRIDE; 81 virtual bool HasCapture() const OVERRIDE;
81 virtual void SetAlwaysOnTop(bool always_on_top) OVERRIDE; 82 virtual void SetAlwaysOnTop(bool always_on_top) OVERRIDE;
83 virtual void SetInterceptAllKeys(bool want_all_keys) OVERRIDE;
82 virtual bool IsAlwaysOnTop() const OVERRIDE; 84 virtual bool IsAlwaysOnTop() const OVERRIDE;
83 virtual void SetVisibleOnAllWorkspaces(bool always_visible) OVERRIDE; 85 virtual void SetVisibleOnAllWorkspaces(bool always_visible) OVERRIDE;
84 virtual bool SetWindowTitle(const base::string16& title) OVERRIDE; 86 virtual bool SetWindowTitle(const base::string16& title) OVERRIDE;
85 virtual void ClearNativeFocus() OVERRIDE; 87 virtual void ClearNativeFocus() OVERRIDE;
86 virtual Widget::MoveLoopResult RunMoveLoop( 88 virtual Widget::MoveLoopResult RunMoveLoop(
87 const gfx::Vector2d& drag_offset, 89 const gfx::Vector2d& drag_offset,
88 Widget::MoveLoopSource source, 90 Widget::MoveLoopSource source,
89 Widget::MoveLoopEscapeBehavior escape_behavior) OVERRIDE; 91 Widget::MoveLoopEscapeBehavior escape_behavior) OVERRIDE;
90 virtual void EndMoveLoop() OVERRIDE; 92 virtual void EndMoveLoop() OVERRIDE;
91 virtual void SetVisibilityChangedAnimationsEnabled(bool value) OVERRIDE; 93 virtual void SetVisibilityChangedAnimationsEnabled(bool value) OVERRIDE;
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 corewm::TooltipWin* tooltip_; 262 corewm::TooltipWin* tooltip_;
261 263
262 // Visibility of the cursor. On Windows we can have multiple root windows and 264 // Visibility of the cursor. On Windows we can have multiple root windows and
263 // the implementation of ::ShowCursor() is based on a counter, so making this 265 // the implementation of ::ShowCursor() is based on a counter, so making this
264 // member static ensures that ::ShowCursor() is always called exactly once 266 // member static ensures that ::ShowCursor() is always called exactly once
265 // whenever the cursor visibility state changes. 267 // whenever the cursor visibility state changes.
266 static bool is_cursor_visible_; 268 static bool is_cursor_visible_;
267 269
268 scoped_ptr<aura::client::ScopedTooltipDisabler> tooltip_disabler_; 270 scoped_ptr<aura::client::ScopedTooltipDisabler> tooltip_disabler_;
269 271
272 // Maintain keyboard hook request.
273 scoped_ptr<DesktopKeyboardCaptureWin> keyboard_capture_;
274
270 DISALLOW_COPY_AND_ASSIGN(DesktopWindowTreeHostWin); 275 DISALLOW_COPY_AND_ASSIGN(DesktopWindowTreeHostWin);
271 }; 276 };
272 277
273 } // namespace views 278 } // namespace views
274 279
275 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_WIN_H_ 280 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698