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

Side by Side Diff: ui/views/focus/focus_manager.h

Issue 8907029: AURA/X11: Handle VKEY_MENU accelerator on content area (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 8 years, 11 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
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | ui/views/focus/focus_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_FOCUS_FOCUS_MANAGER_H_ 5 #ifndef UI_VIEWS_FOCUS_FOCUS_MANAGER_H_
6 #define UI_VIEWS_FOCUS_FOCUS_MANAGER_H_ 6 #define UI_VIEWS_FOCUS_FOCUS_MANAGER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <list> 9 #include <list>
10 #include <map> 10 #include <map>
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 void UnregisterAccelerators(ui::AcceleratorTarget* target); 206 void UnregisterAccelerators(ui::AcceleratorTarget* target);
207 207
208 // Activate the target associated with the specified accelerator. 208 // Activate the target associated with the specified accelerator.
209 // First, AcceleratorPressed handler of the most recently registered target 209 // First, AcceleratorPressed handler of the most recently registered target
210 // is called, and if that handler processes the event (i.e. returns true), 210 // is called, and if that handler processes the event (i.e. returns true),
211 // this method immediately returns. If not, we do the same thing on the next 211 // this method immediately returns. If not, we do the same thing on the next
212 // target, and so on. 212 // target, and so on.
213 // Returns true if an accelerator was activated. 213 // Returns true if an accelerator was activated.
214 bool ProcessAccelerator(const ui::Accelerator& accelerator); 214 bool ProcessAccelerator(const ui::Accelerator& accelerator);
215 215
216 // Resets menu key state if |event| is not menu key release.
217 // This is effective only on x11.
218 void MaybeResetMenuKeyState(const KeyEvent& key);
219
220 #if defined(TOOLKIT_USES_GTK)
221 // Resets menu key state. TODO(oshima): Remove this when views/gtk is removed.
222 void ResetMenuKeyState();
223 #endif
224
216 // Called by a RootView when a view within its hierarchy is removed 225 // Called by a RootView when a view within its hierarchy is removed
217 // from its parent. This will only be called by a RootView in a 226 // from its parent. This will only be called by a RootView in a
218 // hierarchy of Widgets that this FocusManager is attached to the 227 // hierarchy of Widgets that this FocusManager is attached to the
219 // parent Widget of. 228 // parent Widget of.
220 void ViewRemoved(View* removed); 229 void ViewRemoved(View* removed);
221 230
222 // Adds/removes a listener. The FocusChangeListener is notified every time 231 // Adds/removes a listener. The FocusChangeListener is notified every time
223 // the focused view is about to change. 232 // the focused view is about to change.
224 void AddFocusChangeListener(FocusChangeListener* listener); 233 void AddFocusChangeListener(FocusChangeListener* listener);
225 void RemoveFocusChangeListener(FocusChangeListener* listener); 234 void RemoveFocusChangeListener(FocusChangeListener* listener);
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 // The storage id used in the ViewStorage to store/restore the view that last 271 // The storage id used in the ViewStorage to store/restore the view that last
263 // had focus. 272 // had focus.
264 int stored_focused_view_storage_id_; 273 int stored_focused_view_storage_id_;
265 274
266 // The reason why the focus most recently changed. 275 // The reason why the focus most recently changed.
267 FocusChangeReason focus_change_reason_; 276 FocusChangeReason focus_change_reason_;
268 277
269 // The list of registered FocusChange listeners. 278 // The list of registered FocusChange listeners.
270 ObserverList<FocusChangeListener, true> focus_change_listeners_; 279 ObserverList<FocusChangeListener, true> focus_change_listeners_;
271 280
281 #if defined(USE_X11)
282 // Indicates if we should handle the upcoming Alt key release event.
283 bool should_handle_menu_key_release_;
284 #endif
285
272 // See description above getter. 286 // See description above getter.
273 bool is_changing_focus_; 287 bool is_changing_focus_;
274 288
275 DISALLOW_COPY_AND_ASSIGN(FocusManager); 289 DISALLOW_COPY_AND_ASSIGN(FocusManager);
276 }; 290 };
277 291
278 } // namespace views 292 } // namespace views
279 293
280 #endif // UI_VIEWS_FOCUS_FOCUS_MANAGER_H_ 294 #endif // UI_VIEWS_FOCUS_FOCUS_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | ui/views/focus/focus_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698