diff options
author | bryeung@chromium.org <bryeung@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-02 19:22:15 +0000 |
---|---|---|
committer | bryeung@chromium.org <bryeung@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-02 19:22:15 +0000 |
commit | 2b7c9492e9a8794e2124da62bfce91fe3a1b2a77 (patch) | |
tree | f13a5c7961e2655f63916216223d16fa86454a3d /views/controls/table | |
parent | 010e37516995713253daa8df6f7ba1c2b12ccd1d (diff) | |
download | chromium_src-2b7c9492e9a8794e2124da62bfce91fe3a1b2a77.zip chromium_src-2b7c9492e9a8794e2124da62bfce91fe3a1b2a77.tar.gz chromium_src-2b7c9492e9a8794e2124da62bfce91fe3a1b2a77.tar.bz2 |
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
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58388 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 14a5eae..efef1a5 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(base::KeyboardCode virtual_keycode) { +bool GroupTableView::OnKeyDown(app::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(base::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 != base::VKEY_UP) && - (virtual_keycode != base::VKEY_DOWN)) { + if ((virtual_keycode != app::VKEY_UP) && + (virtual_keycode != app::VKEY_DOWN)) { return TableView::OnKeyDown(virtual_keycode); } @@ -116,10 +116,10 @@ bool GroupTableView::OnKeyDown(base::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 == base::VKEY_UP) { + if (virtual_keycode == app::VKEY_UP) { SetFocusOnItem(group_range.start); } else { - DCHECK_EQ(virtual_keycode, base::VKEY_DOWN); + DCHECK_EQ(virtual_keycode, app::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 0e9f1ee..d4853cb 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(base::KeyboardCode virtual_keycode); + virtual bool OnKeyDown(app::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 f0b0659..82561e1 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(base::KeyboardCode virtual_keycode) { +bool NativeTableWin::OnKeyDown(app::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 d23a961..dcbc087 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(base::KeyboardCode virtual_keycode); + virtual bool OnKeyDown(app::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 510d536..e397ce9 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(base::KeyboardCode virtual_keycode) { +bool TableView::OnKeyDown(app::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 2799c62..9444d96b 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(base::KeyboardCode virtual_keycode); + virtual bool OnKeyDown(app::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 07a1e86..86fff7a 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 "base/keyboard_codes.h" +#include "app/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(base::KeyboardCode virtual_keycode) {} + virtual void OnKeyDown(app::KeyboardCode virtual_keycode) {} // Invoked when the user presses the delete key. virtual void OnTableViewDelete(TableView* table_view) {} |