diff options
author | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-02 19:54:58 +0000 |
---|---|---|
committer | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-02 19:54:58 +0000 |
commit | 0cc3dfe387313821853e658a6e2fb3b729eac9e5 (patch) | |
tree | 6bdf4d23c62ae78cafc6e7c5a2599cce70dfef22 /views/controls/table | |
parent | 3c70591cc7d0d8cc162c10f7d3ac3b2ac15e4e69 (diff) | |
download | chromium_src-0cc3dfe387313821853e658a6e2fb3b729eac9e5.zip chromium_src-0cc3dfe387313821853e658a6e2fb3b729eac9e5.tar.gz chromium_src-0cc3dfe387313821853e658a6e2fb3b729eac9e5.tar.bz2 |
Revert 58388 - Revert 58215 - Revert 58186 - Move the keyboard files from base/ to app/.
Also moves the associated classes/enums from base:: to app::.
TEST=try bots compile
BUG=NONE
Review URL: http://codereview.chromium.org/3165064
TBR=bryeung@chromium.org
TBR=phajdan.jr@chromium.org
Review URL: http://codereview.chromium.org/3361003
TBR=bryeung@chromium.org
Review URL: http://codereview.chromium.org/3337006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58390 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls/table')
-rw-r--r-- | views/controls/table/group_table_view.cc | 10 | ||||
-rw-r--r-- | views/controls/table/group_table_view.h | 2 | ||||
-rw-r--r-- | views/controls/table/native_table_win.cc | 2 | ||||
-rw-r--r-- | views/controls/table/native_table_win.h | 2 | ||||
-rw-r--r-- | views/controls/table/table_view.cc | 2 | ||||
-rw-r--r-- | views/controls/table/table_view.h | 4 | ||||
-rw-r--r-- | views/controls/table/table_view_observer.h | 4 |
7 files changed, 13 insertions, 13 deletions
diff --git a/views/controls/table/group_table_view.cc b/views/controls/table/group_table_view.cc index efef1a5..14a5eae 100644 --- a/views/controls/table/group_table_view.cc +++ b/views/controls/table/group_table_view.cc @@ -61,7 +61,7 @@ void GroupTableView::SyncSelection() { } } -bool GroupTableView::OnKeyDown(app::KeyboardCode virtual_keycode) { +bool GroupTableView::OnKeyDown(base::KeyboardCode virtual_keycode) { // In a list view, multiple items can be selected but only one item has the // focus. This creates a problem when the arrow keys are used for navigating // between items in the list view. An example will make this more clear: @@ -87,8 +87,8 @@ bool GroupTableView::OnKeyDown(app::KeyboardCode virtual_keycode) { // detect that one of the arrow keys is pressed. Thus, when it comes time // for the list view control to actually switch the focus, the right item // will be selected. - if ((virtual_keycode != app::VKEY_UP) && - (virtual_keycode != app::VKEY_DOWN)) { + if ((virtual_keycode != base::VKEY_UP) && + (virtual_keycode != base::VKEY_DOWN)) { return TableView::OnKeyDown(virtual_keycode); } @@ -116,10 +116,10 @@ bool GroupTableView::OnKeyDown(app::KeyboardCode virtual_keycode) { // If the user pressed the UP key, then the focus should be set to the // topmost element in the group. If the user pressed the DOWN key, the focus // should be set to the bottommost element. - if (virtual_keycode == app::VKEY_UP) { + if (virtual_keycode == base::VKEY_UP) { SetFocusOnItem(group_range.start); } else { - DCHECK_EQ(virtual_keycode, app::VKEY_DOWN); + DCHECK_EQ(virtual_keycode, base::VKEY_DOWN); SetFocusOnItem(group_range.start + group_range.length - 1); } diff --git a/views/controls/table/group_table_view.h b/views/controls/table/group_table_view.h index d4853cb..0e9f1ee 100644 --- a/views/controls/table/group_table_view.h +++ b/views/controls/table/group_table_view.h @@ -56,7 +56,7 @@ class GroupTableView : public TableView { // keys), we must take action when an arrow key is pressed. The reason we // need to process this message has to do with the manner in which the focus // needs to be set on a group item when a group is selected. - virtual bool OnKeyDown(app::KeyboardCode virtual_keycode); + virtual bool OnKeyDown(base::KeyboardCode virtual_keycode); // Overriden to make sure rows in the same group stay grouped together. virtual int CompareRows(int model_row1, int model_row2); diff --git a/views/controls/table/native_table_win.cc b/views/controls/table/native_table_win.cc index 82561e1..f0b0659 100644 --- a/views/controls/table/native_table_win.cc +++ b/views/controls/table/native_table_win.cc @@ -463,7 +463,7 @@ void NativeTableWin::OnMiddleClick() { table_->observer()->OnMiddleClick(); } -bool NativeTableWin::OnKeyDown(app::KeyboardCode virtual_keycode) { +bool NativeTableWin::OnKeyDown(base::KeyboardCode virtual_keycode) { if (!ignore_listview_change_ && table_->observer()) table_->observer()->OnKeyDown(virtual_keycode); return false; // Let the key event be processed as ususal. diff --git a/views/controls/table/native_table_win.h b/views/controls/table/native_table_win.h index dcbc087..d23a961 100644 --- a/views/controls/table/native_table_win.h +++ b/views/controls/table/native_table_win.h @@ -74,7 +74,7 @@ class NativeTableWin : public NativeControlWin, public NativeTableWrapper { virtual void OnMiddleClick(); // Overridden from NativeControl. Notifies the observer. - virtual bool OnKeyDown(app::KeyboardCode virtual_keycode); + virtual bool OnKeyDown(base::KeyboardCode virtual_keycode); // Custom drawing of our icons. LRESULT OnCustomDraw(NMLVCUSTOMDRAW* draw_info); diff --git a/views/controls/table/table_view.cc b/views/controls/table/table_view.cc index e397ce9..510d536 100644 --- a/views/controls/table/table_view.cc +++ b/views/controls/table/table_view.cc @@ -1488,7 +1488,7 @@ void TableView::OnSelectedStateChanged() { } } -bool TableView::OnKeyDown(app::KeyboardCode virtual_keycode) { +bool TableView::OnKeyDown(base::KeyboardCode virtual_keycode) { if (!ignore_listview_change_ && table_view_observer_) { table_view_observer_->OnKeyDown(virtual_keycode); } diff --git a/views/controls/table/table_view.h b/views/controls/table/table_view.h index 9444d96b..2799c62 100644 --- a/views/controls/table/table_view.h +++ b/views/controls/table/table_view.h @@ -16,8 +16,8 @@ typedef struct tagNMLVCUSTOMDRAW NMLVCUSTOMDRAW; #include <map> #include <vector> -#include "app/keyboard_codes.h" #include "app/table_model_observer.h" +#include "base/keyboard_codes.h" #include "third_party/skia/include/core/SkColor.h" #if defined(OS_WIN) // TODO(port): remove the ifdef when native_control.h is ported. @@ -257,7 +257,7 @@ class TableView : public NativeControl, virtual void OnMiddleClick(); // Overridden from NativeControl. Notifies the observer. - virtual bool OnKeyDown(app::KeyboardCode virtual_keycode); + virtual bool OnKeyDown(base::KeyboardCode virtual_keycode); // Invoked to customize the colors or font at a particular cell. If you // change the colors or font, return true. This is only invoked if diff --git a/views/controls/table/table_view_observer.h b/views/controls/table/table_view_observer.h index 86fff7a..07a1e86 100644 --- a/views/controls/table/table_view_observer.h +++ b/views/controls/table/table_view_observer.h @@ -6,7 +6,7 @@ #define VIEWS_CONTROLS_TABLE_TABLE_VIEW_OBSERVER_H_ #pragma once -#include "app/keyboard_codes.h" +#include "base/keyboard_codes.h" namespace views { @@ -28,7 +28,7 @@ class TableViewObserver { virtual void OnMiddleClick() {} // Optional method invoked when the user hits a key with the table in focus. - virtual void OnKeyDown(app::KeyboardCode virtual_keycode) {} + virtual void OnKeyDown(base::KeyboardCode virtual_keycode) {} // Invoked when the user presses the delete key. virtual void OnTableViewDelete(TableView* table_view) {} |