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

Unified Diff: ui/base/models/accelerator_gtk.h

Issue 8695005: Move accelerator related files to ui/base/accelerators (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/base/models/accelerator_cocoa.mm ('k') | ui/base/ui_base_exports.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/models/accelerator_gtk.h
diff --git a/ui/base/models/accelerator_gtk.h b/ui/base/models/accelerator_gtk.h
deleted file mode 100644
index 720e2919a3aedc71282469cb290b3fe431131cfb..0000000000000000000000000000000000000000
--- a/ui/base/models/accelerator_gtk.h
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef UI_BASE_MODELS_ACCELERATOR_GTK_H_
-#define UI_BASE_MODELS_ACCELERATOR_GTK_H_
-#pragma once
-
-#include <gdk/gdk.h>
-
-#include "ui/base/keycodes/keyboard_code_conversion_gtk.h"
-#include "ui/base/keycodes/keyboard_codes_posix.h"
-#include "ui/base/models/accelerator.h"
-
-namespace ui {
-
-class AcceleratorGtk : public Accelerator {
- public:
- AcceleratorGtk(ui::KeyboardCode key_code,
- bool shift_pressed, bool ctrl_pressed, bool alt_pressed)
- : gdk_keyval_(0) {
- key_code_ = key_code;
- modifiers_ = 0;
- if (shift_pressed)
- modifiers_ |= GDK_SHIFT_MASK;
- if (ctrl_pressed)
- modifiers_ |= GDK_CONTROL_MASK;
- if (alt_pressed)
- modifiers_ |= GDK_MOD1_MASK;
- }
-
- AcceleratorGtk(guint keyval, GdkModifierType modifier_type) {
- key_code_ = ui::WindowsKeyCodeForGdkKeyCode(keyval);
- gdk_keyval_ = keyval;
- modifiers_ = modifier_type;
- }
-
- AcceleratorGtk() : gdk_keyval_(0) { }
- virtual ~AcceleratorGtk() { }
-
- guint GetGdkKeyCode() const {
- return gdk_keyval_ > 0 ?
- // The second parameter is false because accelerator keys are
- // expressed in terms of the non-shift-modified key.
- gdk_keyval_ : ui::GdkKeyCodeForWindowsKeyCode(key_code_, false);
- }
-
- GdkModifierType gdk_modifier_type() const {
- return static_cast<GdkModifierType>(modifiers());
- }
-
- private:
- // The GDK keycode.
- guint gdk_keyval_;
-};
-
-} // namespace ui
-
-#endif // UI_BASE_MODELS_ACCELERATOR_GTK_H_
« no previous file with comments | « ui/base/models/accelerator_cocoa.mm ('k') | ui/base/ui_base_exports.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698