summaryrefslogtreecommitdiffstats
path: root/ui/views/views.gyp
diff options
context:
space:
mode:
authoryusukes@google.com <yusukes@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-08 04:21:56 +0000
committeryusukes@google.com <yusukes@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-08 04:21:56 +0000
commit209571744635b59d8c2135585a7d2074c66063d3 (patch)
treec2d209dcc63c5fe27cddfccbd2a950c6d4eed6ac /ui/views/views.gyp
parentfe6d5ca4089ec0a3effd13eba457a8043539ce63 (diff)
downloadchromium_src-209571744635b59d8c2135585a7d2074c66063d3.zip
chromium_src-209571744635b59d8c2135585a7d2074c66063d3.tar.gz
chromium_src-209571744635b59d8c2135585a7d2074c66063d3.tar.bz2
Let Chrome app handle Ash accelerators first if the app is launched as a window.
Currently, Ash accelerators are handled at a very early stage, right after a native key event is received by aura::RootWindowHost. This CL change the way of handling Ash accelerators as follows to make it more App friendly: 1. If no window is focused, handle an Ash accelerator in ash/accelerators/accelerator_filter.cc in the same way as before. 2. Otherwise, do not handle it in ash/accelerators/accelerator_filter.cc but let a custom views::FocusManager handle it (see ash/shell.cc). There are 3 types of scenarios here depending on the type of the focused window: 2-a. If the focused window is a browser, and the browser is not for an app, let the custom focus manager pre-handle Ash accelerators before passing it to the browser (see PreHandleKeyboardEvent() in chrome/browser/ui/views/frame/browser_view.cc). 2-b. If the focused window is a browser, and the browser is for an app, let the app handle Ash accelerators first (see chrome/browser/ui/views/frame/browser_view.cc). If the accelerator is not consumed by the app, let the custom focus manager handle it. 2-c. If the focused window is not a browser, let the window handle Ash accelerators first. If the accelerator is not consumed by the window, then let the custom focus manager handle it. This means a WebView (without chrome/browser/ layer) can handle Ash accelerators first whenever needed. Other changes: chrome/browser/ui/views/frame/browser_view.cc: Support ET_KEY_RELEASED accelerators in BrowserView::PreHandleKeyboardEvent(). ui/views/focus/focus_manager.cc: Support ET_KEY_RELEASED accelerators. Also fix code for handing VKEY_MENU so that the Shift+Alt+ET_KEY_RELEASED accelerator for Ash could be handled correctly. BUG=123856 TEST=ran aura_shell_unittests TEST=manual; launch Chromoting app as a window, connect to a Chromoting server, focus Chrome on the remote machine, press Ctrl-n, confirm a new window is opened on the remote machine. Review URL: https://chromiumcodereview.appspot.com/10134036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@135791 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/views/views.gyp')
-rw-r--r--ui/views/views.gyp1
1 files changed, 1 insertions, 0 deletions
diff --git a/ui/views/views.gyp b/ui/views/views.gyp
index 60e0a61..ed40650 100644
--- a/ui/views/views.gyp
+++ b/ui/views/views.gyp
@@ -249,6 +249,7 @@
'focus/external_focus_tracker.h',
'focus/focus_manager.cc',
'focus/focus_manager.h',
+ 'focus/focus_manager_delegate.h',
'focus/focus_manager_factory.cc',
'focus/focus_manager_factory.h',
'focus/focus_search.cc',