summaryrefslogtreecommitdiffstats
path: root/views/controls/tree
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-28 21:32:30 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-28 21:32:30 +0000
commita4d271ecbea5ed763d49919fac7bfabe788832f6 (patch)
treec646a4d085142007968138c7ad26d1fb2aafe6a9 /views/controls/tree
parent19ff283d0e043c59206fdc2e890a2780933849fe (diff)
downloadchromium_src-a4d271ecbea5ed763d49919fac7bfabe788832f6.zip
chromium_src-a4d271ecbea5ed763d49919fac7bfabe788832f6.tar.gz
chromium_src-a4d271ecbea5ed763d49919fac7bfabe788832f6.tar.bz2
Reverting 27412 it breaks the toolkit views Linux build.
TBR=sky Review URL: http://codereview.chromium.org/254005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27416 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls/tree')
-rw-r--r--views/controls/tree/tree_view.cc7
-rw-r--r--views/controls/tree/tree_view.h3
2 files changed, 4 insertions, 6 deletions
diff --git a/views/controls/tree/tree_view.cc b/views/controls/tree/tree_view.cc
index c84ef8b..196e773 100644
--- a/views/controls/tree/tree_view.cc
+++ b/views/controls/tree/tree_view.cc
@@ -12,7 +12,6 @@
#include "app/l10n_util_win.h"
#include "app/resource_bundle.h"
#include "base/gfx/point.h"
-#include "base/keyboard_codes.h"
#include "base/stl_util-inl.h"
#include "base/win_util.h"
#include "grit/app_resources.h"
@@ -460,7 +459,7 @@ LRESULT TreeView::OnNotify(int w_param, LPNMHDR l_param) {
return 0;
}
-bool TreeView::OnKeyDown(base::KeyboardCode virtual_key_code) {
+bool TreeView::OnKeyDown(int virtual_key_code) {
if (virtual_key_code == VK_F2) {
if (!GetEditingNode()) {
TreeModelNode* selected_node = GetSelectedNode();
@@ -468,10 +467,10 @@ bool TreeView::OnKeyDown(base::KeyboardCode virtual_key_code) {
StartEditing(selected_node);
}
return true;
- } else if (virtual_key_code == base::VKEY_RETURN && !process_enter_) {
+ } else if (virtual_key_code == VK_RETURN && !process_enter_) {
Widget* widget = GetWidget();
DCHECK(widget);
- Accelerator accelerator(Accelerator(virtual_key_code,
+ Accelerator accelerator(Accelerator(static_cast<int>(virtual_key_code),
win_util::IsShiftPressed(),
win_util::IsCtrlPressed(),
win_util::IsAltPressed()));
diff --git a/views/controls/tree/tree_view.h b/views/controls/tree/tree_view.h
index 0011835..72667bf 100644
--- a/views/controls/tree/tree_view.h
+++ b/views/controls/tree/tree_view.h
@@ -12,7 +12,6 @@
#include "app/tree_model.h"
#include "base/basictypes.h"
-#include "base/keyboard_codes.h"
#include "base/logging.h"
#include "views/controls/native_control.h"
@@ -160,7 +159,7 @@ class TreeView : public NativeControl, TreeModelObserver {
// We pay attention to key down for two reasons: to circumvent VK_ENTER from
// toggling the expaned state when processes_enter_ is false, and to have F2
// start editting.
- virtual bool OnKeyDown(base::KeyboardCode virtual_key_code);
+ virtual bool OnKeyDown(int virtual_key_code);
virtual void OnContextMenu(const POINT& location);