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

Side by Side Diff: ui/base/models/accelerator_gtk.h

Issue 6812037: GTK: A first *very* rough cut at a global menu. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comment Created 9 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) 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_BASE_MODELS_ACCELERATOR_GTK_H_ 5 #ifndef UI_BASE_MODELS_ACCELERATOR_GTK_H_
6 #define UI_BASE_MODELS_ACCELERATOR_GTK_H_ 6 #define UI_BASE_MODELS_ACCELERATOR_GTK_H_
7 #pragma once 7 #pragma once
8 8
9 #include <gdk/gdk.h> 9 #include <gdk/gdk.h>
10 10
(...skipping 27 matching lines...) Expand all
38 AcceleratorGtk() : gdk_keyval_(0) { } 38 AcceleratorGtk() : gdk_keyval_(0) { }
39 virtual ~AcceleratorGtk() { } 39 virtual ~AcceleratorGtk() { }
40 40
41 guint GetGdkKeyCode() const { 41 guint GetGdkKeyCode() const {
42 return gdk_keyval_ > 0 ? 42 return gdk_keyval_ > 0 ?
43 // The second parameter is false because accelerator keys are 43 // The second parameter is false because accelerator keys are
44 // expressed in terms of the non-shift-modified key. 44 // expressed in terms of the non-shift-modified key.
45 gdk_keyval_ : ui::GdkKeyCodeForWindowsKeyCode(key_code_, false); 45 gdk_keyval_ : ui::GdkKeyCodeForWindowsKeyCode(key_code_, false);
46 } 46 }
47 47
48 GdkModifierType gdk_modifier_type() { 48 GdkModifierType gdk_modifier_type() const {
49 return static_cast<GdkModifierType>(modifiers()); 49 return static_cast<GdkModifierType>(modifiers());
50 } 50 }
51 51
52 private: 52 private:
53 // The GDK keycode. 53 // The GDK keycode.
54 guint gdk_keyval_; 54 guint gdk_keyval_;
55 }; 55 };
56 56
57 } // namespace ui 57 } // namespace ui
58 58
59 #endif // UI_BASE_MODELS_ACCELERATOR_GTK_H_ 59 #endif // UI_BASE_MODELS_ACCELERATOR_GTK_H_
OLDNEW
« chrome/browser/ui/gtk/global_menu_bar.cc ('K') | « chrome/chrome_browser.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698