summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-09 23:28:06 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-09 23:28:06 +0000
commite2e88e7f5dbcbb2367d632b534ca0e75aab9f25c (patch)
tree05402030dd11561f128734a8df6e2e6a848fc366 /chrome/browser
parent6e472da04f540d7837b7a344383869013bc57a3d (diff)
downloadchromium_src-e2e88e7f5dbcbb2367d632b534ca0e75aab9f25c.zip
chromium_src-e2e88e7f5dbcbb2367d632b534ca0e75aab9f25c.tar.gz
chromium_src-e2e88e7f5dbcbb2367d632b534ca0e75aab9f25c.tar.bz2
Migrate Event API methods to Google Style.
BUG=72040 TEST=none Review URL: http://codereview.chromium.org/6480001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74377 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/autocomplete/autocomplete_edit_view_views.cc20
-rw-r--r--chrome/browser/autocomplete/autocomplete_edit_view_win.cc2
-rw-r--r--chrome/browser/bookmarks/bookmark_drop_info.cc2
-rw-r--r--chrome/browser/bookmarks/bookmark_utils.cc2
-rw-r--r--chrome/browser/chromeos/login/captcha_view.cc2
-rw-r--r--chrome/browser/chromeos/login/existing_user_view.cc10
-rw-r--r--chrome/browser/chromeos/login/guest_user_view.cc4
-rw-r--r--chrome/browser/chromeos/login/new_user_view.cc4
-rw-r--r--chrome/browser/chromeos/login/screen_lock_view.cc2
-rw-r--r--chrome/browser/chromeos/login/textfield_with_margin.cc2
-rw-r--r--chrome/browser/chromeos/options/wifi_config_view.cc2
-rw-r--r--chrome/browser/extensions/extension_input_api.cc6
-rw-r--r--chrome/browser/extensions/key_identifier_conversion_views_unittest.cc28
-rw-r--r--chrome/browser/ui/views/bookmark_bar_view.cc11
-rw-r--r--chrome/browser/ui/views/browser_actions_container.cc2
-rw-r--r--chrome/browser/ui/views/content_setting_bubble_contents.cc2
-rw-r--r--chrome/browser/ui/views/download_item_view.cc3
-rw-r--r--chrome/browser/ui/views/dropdown_bar_host_win.cc2
-rw-r--r--chrome/browser/ui/views/extensions/browser_action_overflow_menu_controller.cc4
-rw-r--r--chrome/browser/ui/views/extensions/extension_view.cc2
-rw-r--r--chrome/browser/ui/views/find_bar_host.cc2
-rw-r--r--chrome/browser/ui/views/find_bar_view.cc2
-rw-r--r--chrome/browser/ui/views/frame/browser_root_view.cc10
-rw-r--r--chrome/browser/ui/views/frame/browser_view.cc2
-rw-r--r--chrome/browser/ui/views/location_bar/location_bar_view.cc6
-rw-r--r--chrome/browser/ui/views/location_bar/page_action_image_view.cc3
-rw-r--r--chrome/browser/ui/views/location_bar/star_view.cc3
-rw-r--r--chrome/browser/ui/views/options/cookies_view.cc4
-rw-r--r--chrome/browser/ui/views/tabs/tab_strip.cc4
29 files changed, 72 insertions, 76 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_views.cc b/chrome/browser/autocomplete/autocomplete_edit_view_views.cc
index c030c57..80baa0d 100644
--- a/chrome/browser/autocomplete/autocomplete_edit_view_views.cc
+++ b/chrome/browser/autocomplete/autocomplete_edit_view_views.cc
@@ -165,21 +165,21 @@ bool AutocompleteEditViewViews::HandleAfterKeyEvent(
if (content_maybe_changed_by_key_press_)
OnAfterPossibleChange();
- if (event.GetKeyCode() == ui::VKEY_RETURN) {
+ if (event.key_code() == ui::VKEY_RETURN) {
bool alt_held = event.IsAltDown();
model_->AcceptInput(alt_held ? NEW_FOREGROUND_TAB : CURRENT_TAB, false);
handled = true;
- } else if (!handled && event.GetKeyCode() == ui::VKEY_ESCAPE) {
+ } else if (!handled && event.key_code() == ui::VKEY_ESCAPE) {
// We can handle the Escape key if textfield did not handle it.
// If it's not handled by us, then we need to propagate it up to the parent
// widgets, so that Escape accelerator can still work.
handled = model_->OnEscapeKeyPressed();
- } else if (event.GetKeyCode() == ui::VKEY_CONTROL) {
+ } else if (event.key_code() == ui::VKEY_CONTROL) {
// Omnibox2 can switch its contents while pressing a control key. To switch
// the contents of omnibox2, we notify the AutocompleteEditModel class when
// the control-key state is changed.
model_->OnControlKeyChanged(true);
- } else if (!text_changed_ && event.GetKeyCode() == ui::VKEY_DELETE &&
+ } else if (!text_changed_ && event.key_code() == ui::VKEY_DELETE &&
event.IsShiftDown()) {
// If shift+del didn't change the text, we let this delete an entry from
// the popup. We can't check to see if the IME handled it because even if
@@ -187,14 +187,14 @@ bool AutocompleteEditViewViews::HandleAfterKeyEvent(
AutocompletePopupModel* popup_model = popup_view_->GetModel();
if (popup_model->IsOpen())
popup_model->TryDeletingCurrentItem();
- } else if (!handled && event.GetKeyCode() == ui::VKEY_UP) {
+ } else if (!handled && event.key_code() == ui::VKEY_UP) {
model_->OnUpOrDownKeyPressed(-1);
handled = true;
- } else if (!handled && event.GetKeyCode() == ui::VKEY_DOWN) {
+ } else if (!handled && event.key_code() == ui::VKEY_DOWN) {
model_->OnUpOrDownKeyPressed(1);
handled = true;
} else if (!handled &&
- event.GetKeyCode() == ui::VKEY_TAB &&
+ event.key_code() == ui::VKEY_TAB &&
!event.IsShiftDown() &&
!event.IsControlDown()) {
if (model_->is_keyword_hint()) {
@@ -224,7 +224,7 @@ bool AutocompleteEditViewViews::HandleKeyReleaseEvent(
// Omnibox2 can switch its contents while pressing a control key. To switch
// the contents of omnibox2, we notify the AutocompleteEditModel class when
// the control-key state is changed.
- if (event.GetKeyCode() == ui::VKEY_CONTROL) {
+ if (event.key_code() == ui::VKEY_CONTROL) {
// TODO(oshima): investigate if we need to support keyboard with two
// controls. See autocomplete_edit_view_gtk.cc.
model_->OnControlKeyChanged(false);
@@ -583,7 +583,7 @@ void AutocompleteEditViewViews::ContentsChanged(views::Textfield* sender,
bool AutocompleteEditViewViews::HandleKeyEvent(
views::Textfield* textfield,
const views::KeyEvent& event) {
- delete_was_pressed_ = event.GetKeyCode() == ui::VKEY_DELETE;
+ delete_was_pressed_ = event.key_code() == ui::VKEY_DELETE;
// Reset |text_changed_| before passing the key event on to the text view.
text_changed_ = false;
@@ -591,7 +591,7 @@ bool AutocompleteEditViewViews::HandleKeyEvent(
handling_key_press_ = true;
content_maybe_changed_by_key_press_ = false;
- if (event.GetKeyCode() == ui::VKEY_BACK) {
+ if (event.key_code() == ui::VKEY_BACK) {
// Checks if it's currently in keyword search mode.
if (model_->is_keyword_hint() || model_->keyword().empty())
return false;
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_win.cc b/chrome/browser/autocomplete/autocomplete_edit_view_win.cc
index 6366873..889d682 100644
--- a/chrome/browser/autocomplete/autocomplete_edit_view_win.cc
+++ b/chrome/browser/autocomplete/autocomplete_edit_view_win.cc
@@ -969,7 +969,7 @@ void AutocompleteEditViewWin::PasteAndGo(const string16& text) {
bool AutocompleteEditViewWin::SkipDefaultKeyEventProcessing(
const views::KeyEvent& e) {
- ui::KeyboardCode key = e.GetKeyCode();
+ ui::KeyboardCode key = e.key_code();
// We don't process ALT + numpad digit as accelerators, they are used for
// entering special characters. We do translate alt-home.
if (e.IsAltDown() && (key != ui::VKEY_HOME) &&
diff --git a/chrome/browser/bookmarks/bookmark_drop_info.cc b/chrome/browser/bookmarks/bookmark_drop_info.cc
index ba9d7a0..30d1f03 100644
--- a/chrome/browser/bookmarks/bookmark_drop_info.cc
+++ b/chrome/browser/bookmarks/bookmark_drop_info.cc
@@ -26,7 +26,7 @@ BookmarkDropInfo::~BookmarkDropInfo() {
}
void BookmarkDropInfo::Update(const views::DropTargetEvent& event) {
- source_operations_ = event.GetSourceOperations();
+ source_operations_ = event.source_operations();
is_control_down_ = event.IsControlDown();
last_y_ = event.y();
diff --git a/chrome/browser/bookmarks/bookmark_utils.cc b/chrome/browser/bookmarks/bookmark_utils.cc
index 6e26e9b..42bde4a3 100644
--- a/chrome/browser/bookmarks/bookmark_utils.cc
+++ b/chrome/browser/bookmarks/bookmark_utils.cc
@@ -244,7 +244,7 @@ int BookmarkDropOperation(Profile* profile,
return ui::DragDropTypes::DRAG_MOVE;
}
// User is dragging from another app, copy.
- return PreferredDropOperation(event.GetSourceOperations(),
+ return PreferredDropOperation(event.source_operations(),
ui::DragDropTypes::DRAG_COPY | ui::DragDropTypes::DRAG_LINK);
}
diff --git a/chrome/browser/chromeos/login/captcha_view.cc b/chrome/browser/chromeos/login/captcha_view.cc
index 4126832..c4c295b 100644
--- a/chrome/browser/chromeos/login/captcha_view.cc
+++ b/chrome/browser/chromeos/login/captcha_view.cc
@@ -123,7 +123,7 @@ void CaptchaView::ViewHierarchyChanged(bool is_add,
bool CaptchaView::HandleKeyEvent(views::Textfield* sender,
const views::KeyEvent& key_event) {
if (sender == captcha_textfield_ &&
- key_event.GetKeyCode() == ui::VKEY_RETURN) {
+ key_event.key_code() == ui::VKEY_RETURN) {
if (is_standalone_) {
Accept();
} else {
diff --git a/chrome/browser/chromeos/login/existing_user_view.cc b/chrome/browser/chromeos/login/existing_user_view.cc
index dcf100f..8655351 100644
--- a/chrome/browser/chromeos/login/existing_user_view.cc
+++ b/chrome/browser/chromeos/login/existing_user_view.cc
@@ -33,13 +33,13 @@ class UserEntryTextfield : public TextfieldWithMargin {
// Overridden from views::View:
virtual bool OnKeyPressed(const views::KeyEvent& e) {
- if (e.GetKeyCode() == ui::VKEY_TAB) {
+ if (e.key_code() == ui::VKEY_TAB) {
controller_->SelectUserRelative(e.IsShiftDown() ? -1 : 1);
return true;
- } else if (e.GetKeyCode() == ui::VKEY_LEFT) {
+ } else if (e.key_code() == ui::VKEY_LEFT) {
controller_->SelectUserRelative(-1);
return true;
- } else if (e.GetKeyCode() == ui::VKEY_RIGHT) {
+ } else if (e.key_code() == ui::VKEY_RIGHT) {
controller_->SelectUserRelative(1);
return true;
} else {
@@ -48,7 +48,7 @@ class UserEntryTextfield : public TextfieldWithMargin {
}
virtual bool SkipDefaultKeyEventProcessing(const views::KeyEvent& e) {
- if (e.GetKeyCode() == ui::VKEY_TAB)
+ if (e.key_code() == ui::VKEY_TAB)
return true;
else
return views::Textfield::SkipDefaultKeyEventProcessing(e);
@@ -104,7 +104,7 @@ bool ExistingUserView::AcceleratorPressed(
bool ExistingUserView::HandleKeyEvent(views::Textfield* sender,
const views::KeyEvent& key_event) {
- if (key_event.GetKeyCode() == ui::VKEY_RETURN) {
+ if (key_event.key_code() == ui::VKEY_RETURN) {
if (!password_field_->text().empty())
user_controller_->OnLogin("", UTF16ToUTF8(password_field_->text()));
} else {
diff --git a/chrome/browser/chromeos/login/guest_user_view.cc b/chrome/browser/chromeos/login/guest_user_view.cc
index 5f9b9b5..02978e2 100644
--- a/chrome/browser/chromeos/login/guest_user_view.cc
+++ b/chrome/browser/chromeos/login/guest_user_view.cc
@@ -23,7 +23,7 @@ class UserEntryButton : public login::WideButton {
// Overridden from views::View:
virtual bool OnKeyPressed(const views::KeyEvent& e) {
- if (e.GetKeyCode() == ui::VKEY_TAB) {
+ if (e.key_code() == ui::VKEY_TAB) {
user_controller_->SelectUserRelative(e.IsShiftDown() ? -1 : 1);
return true;
}
@@ -31,7 +31,7 @@ class UserEntryButton : public login::WideButton {
}
virtual bool SkipDefaultKeyEventProcessing(const views::KeyEvent& e) {
- if (e.GetKeyCode() == ui::VKEY_TAB)
+ if (e.key_code() == ui::VKEY_TAB)
return true;
return WideButton::SkipDefaultKeyEventProcessing(e);
}
diff --git a/chrome/browser/chromeos/login/new_user_view.cc b/chrome/browser/chromeos/login/new_user_view.cc
index 121cf9f..ab17d64 100644
--- a/chrome/browser/chromeos/login/new_user_view.cc
+++ b/chrome/browser/chromeos/login/new_user_view.cc
@@ -85,7 +85,7 @@ class UsernameField : public chromeos::TextfieldWithMargin {
// Overridden from views::View:
virtual bool OnKeyPressed(const views::KeyEvent& e) {
- if (e.GetKeyCode() == ui::VKEY_LEFT) {
+ if (e.key_code() == ui::VKEY_LEFT) {
return controller_->NavigateAway();
}
return false;
@@ -512,7 +512,7 @@ bool NewUserView::HandleKeyEvent(views::Textfield* sender,
if (!CrosLibrary::Get()->EnsureLoaded() || login_in_process_)
return false;
- if (key_event.GetKeyCode() == ui::VKEY_RETURN) {
+ if (key_event.key_code() == ui::VKEY_RETURN) {
if (!username_field_->text().empty() && !password_field_->text().empty())
Login();
// Return true so that processing ends
diff --git a/chrome/browser/chromeos/login/screen_lock_view.cc b/chrome/browser/chromeos/login/screen_lock_view.cc
index e74710a..0ebcd09 100644
--- a/chrome/browser/chromeos/login/screen_lock_view.cc
+++ b/chrome/browser/chromeos/login/screen_lock_view.cc
@@ -198,7 +198,7 @@ bool ScreenLockView::HandleKeyEvent(
views::Textfield* sender,
const views::KeyEvent& key_event) {
screen_locker_->ClearErrors();
- if (key_event.GetKeyCode() == ui::VKEY_RETURN) {
+ if (key_event.key_code() == ui::VKEY_RETURN) {
screen_locker_->Authenticate(password_field_->text());
return true;
}
diff --git a/chrome/browser/chromeos/login/textfield_with_margin.cc b/chrome/browser/chromeos/login/textfield_with_margin.cc
index 38cadb7..eb75416 100644
--- a/chrome/browser/chromeos/login/textfield_with_margin.cc
+++ b/chrome/browser/chromeos/login/textfield_with_margin.cc
@@ -36,7 +36,7 @@ void TextfieldWithMargin::Layout() {
}
bool TextfieldWithMargin::OnKeyPressed(const views::KeyEvent& e) {
- if (e.GetKeyCode() == ui::VKEY_ESCAPE && !text().empty()) {
+ if (e.key_code() == ui::VKEY_ESCAPE && !text().empty()) {
SetText(string16());
return true;
}
diff --git a/chrome/browser/chromeos/options/wifi_config_view.cc b/chrome/browser/chromeos/options/wifi_config_view.cc
index f55c1b5..e419994 100644
--- a/chrome/browser/chromeos/options/wifi_config_view.cc
+++ b/chrome/browser/chromeos/options/wifi_config_view.cc
@@ -152,7 +152,7 @@ void WifiConfigView::ContentsChanged(views::Textfield* sender,
bool WifiConfigView::HandleKeyEvent(views::Textfield* sender,
const views::KeyEvent& key_event) {
if (sender == passphrase_textfield_ &&
- key_event.GetKeyCode() == ui::VKEY_RETURN) {
+ key_event.key_code() == ui::VKEY_RETURN) {
parent_->GetDialogClientView()->AcceptWindow();
}
return false;
diff --git a/chrome/browser/extensions/extension_input_api.cc b/chrome/browser/extensions/extension_input_api.cc
index bb91c00..f4913b96 100644
--- a/chrome/browser/extensions/extension_input_api.cc
+++ b/chrome/browser/extensions/extension_input_api.cc
@@ -89,12 +89,12 @@ bool SendKeyboardEventInputFunction::RunImpl() {
const views::KeyEvent& prototype_event =
KeyEventFromKeyIdentifier(identifier);
- if (prototype_event.GetKeyCode() == ui::VKEY_UNKNOWN) {
+ if (prototype_event.key_code() == ui::VKEY_UNKNOWN) {
error_ = kUnknownOrUnsupportedKeyIdentiferError;
return false;
}
- int flags = prototype_event.GetFlags();
+ int flags = prototype_event.flags();
bool alt = false;
if (args->GetBoolean(kAlt, &alt))
flags |= alt ? views::Event::EF_ALT_DOWN : 0;
@@ -119,7 +119,7 @@ bool SendKeyboardEventInputFunction::RunImpl() {
return false;
}
- views::KeyEvent event(type, prototype_event.GetKeyCode(), flags, 0, 0);
+ views::KeyEvent event(type, prototype_event.key_code(), flags, 0, 0);
if (!root_view->ProcessKeyEvent(event)) {
error_ = kKeyEventUnprocessedError;
return false;
diff --git a/chrome/browser/extensions/key_identifier_conversion_views_unittest.cc b/chrome/browser/extensions/key_identifier_conversion_views_unittest.cc
index 79ce56e..8f36e98 100644
--- a/chrome/browser/extensions/key_identifier_conversion_views_unittest.cc
+++ b/chrome/browser/extensions/key_identifier_conversion_views_unittest.cc
@@ -23,40 +23,40 @@ class KeyEventFromKeyIdentifierTest : public testing::Test {
};
TEST_F(KeyEventFromKeyIdentifierTest, MatchOnIdentifier) {
- EXPECT_EQ(ui::VKEY_APPS, KeyEventFromKeyIdentifier("Apps").GetKeyCode());
+ EXPECT_EQ(ui::VKEY_APPS, KeyEventFromKeyIdentifier("Apps").key_code());
EXPECT_EQ(ui::VKEY_UNKNOWN,
- KeyEventFromKeyIdentifier("Nonsense").GetKeyCode());
+ KeyEventFromKeyIdentifier("Nonsense").key_code());
}
TEST_F(KeyEventFromKeyIdentifierTest, MatchOnCharacter) {
- EXPECT_EQ(ui::VKEY_A, KeyEventFromKeyIdentifier("a").GetKeyCode());
- EXPECT_EQ(ui::VKEY_A, KeyEventFromKeyIdentifier("A").GetKeyCode());
- EXPECT_EQ(ui::VKEY_OEM_PERIOD, KeyEventFromKeyIdentifier(">").GetKeyCode());
+ EXPECT_EQ(ui::VKEY_A, KeyEventFromKeyIdentifier("a").key_code());
+ EXPECT_EQ(ui::VKEY_A, KeyEventFromKeyIdentifier("A").key_code());
+ EXPECT_EQ(ui::VKEY_OEM_PERIOD, KeyEventFromKeyIdentifier(">").key_code());
std::string non_printing_char(" ");
non_printing_char[0] = static_cast<char>(1);
EXPECT_EQ(ui::VKEY_UNKNOWN,
- KeyEventFromKeyIdentifier(non_printing_char).GetKeyCode());
+ KeyEventFromKeyIdentifier(non_printing_char).key_code());
}
TEST_F(KeyEventFromKeyIdentifierTest, MatchOnUnicodeCodepoint) {
- EXPECT_EQ(ui::VKEY_A, KeyEventFromKeyIdentifier("U+0041").GetKeyCode());
- EXPECT_EQ(ui::VKEY_A, KeyEventFromKeyIdentifier("U+0061").GetKeyCode());
- EXPECT_EQ(ui::VKEY_DELETE, KeyEventFromKeyIdentifier("U+007F").GetKeyCode());
+ EXPECT_EQ(ui::VKEY_A, KeyEventFromKeyIdentifier("U+0041").key_code());
+ EXPECT_EQ(ui::VKEY_A, KeyEventFromKeyIdentifier("U+0061").key_code());
+ EXPECT_EQ(ui::VKEY_DELETE, KeyEventFromKeyIdentifier("U+007F").key_code());
// this one exists in the map, but has no valid ui::VKEY
- EXPECT_EQ(ui::VKEY_UNKNOWN, KeyEventFromKeyIdentifier("U+030A").GetKeyCode());
+ EXPECT_EQ(ui::VKEY_UNKNOWN, KeyEventFromKeyIdentifier("U+030A").key_code());
// this one is not in the map
- EXPECT_EQ(ui::VKEY_UNKNOWN, KeyEventFromKeyIdentifier("U+0001").GetKeyCode());
+ EXPECT_EQ(ui::VKEY_UNKNOWN, KeyEventFromKeyIdentifier("U+0001").key_code());
}
TEST_F(KeyEventFromKeyIdentifierTest, DoesNotMatchEmptyString) {
- EXPECT_EQ(ui::VKEY_UNKNOWN, KeyEventFromKeyIdentifier("").GetKeyCode());
+ EXPECT_EQ(ui::VKEY_UNKNOWN, KeyEventFromKeyIdentifier("").key_code());
}
TEST_F(KeyEventFromKeyIdentifierTest, ShiftModifiersAreSet) {
- EXPECT_EQ(0, KeyEventFromKeyIdentifier("1").GetFlags());
+ EXPECT_EQ(0, KeyEventFromKeyIdentifier("1").flags());
const char* keys_with_shift[] = {
"~", "!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "_", "+",
@@ -66,7 +66,7 @@ TEST_F(KeyEventFromKeyIdentifierTest, ShiftModifiersAreSet) {
for (int i = 0; i < kNumKeysWithShift; ++i) {
EXPECT_EQ(views::Event::EF_SHIFT_DOWN,
- KeyEventFromKeyIdentifier(keys_with_shift[i]).GetFlags());
+ KeyEventFromKeyIdentifier(keys_with_shift[i]).flags());
}
}
diff --git a/chrome/browser/ui/views/bookmark_bar_view.cc b/chrome/browser/ui/views/bookmark_bar_view.cc
index d0d9510..90e1694 100644
--- a/chrome/browser/ui/views/bookmark_bar_view.cc
+++ b/chrome/browser/ui/views/bookmark_bar_view.cc
@@ -193,12 +193,12 @@ class BookmarkFolderButton : public views::MenuButton {
virtual bool IsTriggerableEvent(const views::MouseEvent& e) {
// Left clicks should show the menu contents and right clicks should show
// the context menu. They should not trigger the opening of underlying urls.
- if (e.GetFlags() == views::MouseEvent::EF_LEFT_BUTTON_DOWN ||
- e.GetFlags() == views::MouseEvent::EF_RIGHT_BUTTON_DOWN)
+ if (e.flags() == views::MouseEvent::EF_LEFT_BUTTON_DOWN ||
+ e.flags() == views::MouseEvent::EF_RIGHT_BUTTON_DOWN)
return false;
WindowOpenDisposition disposition(
- event_utils::DispositionFromEventFlags(e.GetFlags()));
+ event_utils::DispositionFromEventFlags(e.flags()));
return disposition != CURRENT_TAB;
}
@@ -1402,9 +1402,8 @@ int BookmarkBarView::CalculateDropOperation(const DropTargetEvent& event,
int ops = data.GetFirstNode(profile_)
? ui::DragDropTypes::DRAG_MOVE
: ui::DragDropTypes::DRAG_COPY | ui::DragDropTypes::DRAG_LINK;
- return
- bookmark_utils::PreferredDropOperation(event.GetSourceOperations(),
- ops);
+ return bookmark_utils::PreferredDropOperation(event.source_operations(),
+ ops);
}
for (int i = 0; i < GetBookmarkButtonCount() &&
diff --git a/chrome/browser/ui/views/browser_actions_container.cc b/chrome/browser/ui/views/browser_actions_container.cc
index 8a2b9a1..77ecd07 100644
--- a/chrome/browser/ui/views/browser_actions_container.cc
+++ b/chrome/browser/ui/views/browser_actions_container.cc
@@ -699,7 +699,7 @@ void BrowserActionsContainer::OnDragExited() {
int BrowserActionsContainer::OnPerformDrop(
const views::DropTargetEvent& event) {
BrowserActionDragData data;
- if (!data.Read(event.GetData()))
+ if (!data.Read(event.data()))
return ui::DragDropTypes::DRAG_NONE;
// Make sure we have the same view as we started with.
diff --git a/chrome/browser/ui/views/content_setting_bubble_contents.cc b/chrome/browser/ui/views/content_setting_bubble_contents.cc
index c2b93d7..de139bf 100644
--- a/chrome/browser/ui/views/content_setting_bubble_contents.cc
+++ b/chrome/browser/ui/views/content_setting_bubble_contents.cc
@@ -92,7 +92,7 @@ void ContentSettingBubbleContents::Favicon::OnMouseReleased(
if (!canceled &&
(event.IsLeftMouseButton() || event.IsMiddleMouseButton()) &&
HitTest(event.location()))
- parent_->LinkActivated(link_, event.GetFlags());
+ parent_->LinkActivated(link_, event.flags());
}
gfx::NativeCursor ContentSettingBubbleContents::Favicon::GetCursorForPoint(
diff --git a/chrome/browser/ui/views/download_item_view.cc b/chrome/browser/ui/views/download_item_view.cc
index ff2d44f..92f5c341 100644
--- a/chrome/browser/ui/views/download_item_view.cc
+++ b/chrome/browser/ui/views/download_item_view.cc
@@ -876,8 +876,7 @@ bool DownloadItemView::OnKeyPressed(const views::KeyEvent& e) {
if (IsDangerousMode())
return true;
- if (e.GetKeyCode() == ui::VKEY_SPACE ||
- e.GetKeyCode() == ui::VKEY_RETURN) {
+ if (e.key_code() == ui::VKEY_SPACE || e.key_code() == ui::VKEY_RETURN) {
OpenDownload();
return true;
}
diff --git a/chrome/browser/ui/views/dropdown_bar_host_win.cc b/chrome/browser/ui/views/dropdown_bar_host_win.cc
index f08db1d..0f0ce6a 100644
--- a/chrome/browser/ui/views/dropdown_bar_host_win.cc
+++ b/chrome/browser/ui/views/dropdown_bar_host_win.cc
@@ -17,7 +17,7 @@ NativeWebKeyboardEvent DropdownBarHost::GetKeyboardEvent(
const TabContents* contents,
const views::KeyEvent& key_event) {
HWND hwnd = contents->GetContentNativeView();
- WORD key = WindowsKeyCodeForKeyboardCode(key_event.GetKeyCode());
+ WORD key = WindowsKeyCodeForKeyboardCode(key_event.key_code());
return NativeWebKeyboardEvent(hwnd, key_event.message(), key, 0);
}
diff --git a/chrome/browser/ui/views/extensions/browser_action_overflow_menu_controller.cc b/chrome/browser/ui/views/extensions/browser_action_overflow_menu_controller.cc
index 3c6260d..549017d 100644
--- a/chrome/browser/ui/views/extensions/browser_action_overflow_menu_controller.cc
+++ b/chrome/browser/ui/views/extensions/browser_action_overflow_menu_controller.cc
@@ -148,7 +148,7 @@ int BrowserActionOverflowMenuController::GetDropOperation(
// (because we don't shrink the BrowserActionContainer when you do this).
if ((item->GetCommand() == 0) && (*position == DROP_BEFORE)) {
BrowserActionDragData drop_data;
- if (!drop_data.Read(event.GetData()))
+ if (!drop_data.Read(event.data()))
return ui::DragDropTypes::DRAG_NONE;
if (drop_data.index() < owner_->VisibleBrowserActions())
@@ -163,7 +163,7 @@ int BrowserActionOverflowMenuController::OnPerformDrop(
DropPosition position,
const views::DropTargetEvent& event) {
BrowserActionDragData drop_data;
- if (!drop_data.Read(event.GetData()))
+ if (!drop_data.Read(event.data()))
return ui::DragDropTypes::DRAG_NONE;
size_t drop_index;
diff --git a/chrome/browser/ui/views/extensions/extension_view.cc b/chrome/browser/ui/views/extensions/extension_view.cc
index 077f4cd..811f12e 100644
--- a/chrome/browser/ui/views/extensions/extension_view.cc
+++ b/chrome/browser/ui/views/extensions/extension_view.cc
@@ -177,7 +177,7 @@ void ExtensionView::PreferredSizeChanged() {
bool ExtensionView::SkipDefaultKeyEventProcessing(const views::KeyEvent& e) {
// Let the tab key event be processed by the renderer (instead of moving the
// focus to the next focusable view).
- return (e.GetKeyCode() == ui::VKEY_TAB);
+ return (e.key_code() == ui::VKEY_TAB);
}
void ExtensionView::HandleMouseMove() {
diff --git a/chrome/browser/ui/views/find_bar_host.cc b/chrome/browser/ui/views/find_bar_host.cc
index a253f8f..c1eac91 100644
--- a/chrome/browser/ui/views/find_bar_host.cc
+++ b/chrome/browser/ui/views/find_bar_host.cc
@@ -49,7 +49,7 @@ bool FindBarHost::MaybeForwardKeyEventToWebpage(
return false;
}
- switch (key_event.GetKeyCode()) {
+ switch (key_event.key_code()) {
case ui::VKEY_DOWN:
case ui::VKEY_UP:
case ui::VKEY_PRIOR:
diff --git a/chrome/browser/ui/views/find_bar_view.cc b/chrome/browser/ui/views/find_bar_view.cc
index 92e5619..87a7abd 100644
--- a/chrome/browser/ui/views/find_bar_view.cc
+++ b/chrome/browser/ui/views/find_bar_view.cc
@@ -514,7 +514,7 @@ bool FindBarView::HandleKeyEvent(views::Textfield* sender,
if (find_bar_host()->MaybeForwardKeyEventToWebpage(key_event))
return true; // Handled, we are done!
- if (key_event.GetKeyCode() == ui::VKEY_RETURN) {
+ if (key_event.key_code() == ui::VKEY_RETURN) {
// Pressing Return/Enter starts the search (unless text box is empty).
string16 find_string = find_text_->text();
if (!find_string.empty()) {
diff --git a/chrome/browser/ui/views/frame/browser_root_view.cc b/chrome/browser/ui/views/frame/browser_root_view.cc
index 0eb38e3..bba2945 100644
--- a/chrome/browser/ui/views/frame/browser_root_view.cc
+++ b/chrome/browser/ui/views/frame/browser_root_view.cc
@@ -56,7 +56,7 @@ void BrowserRootView::OnDragEntered(const views::DropTargetEvent& event) {
if (ShouldForwardToTabStrip(event)) {
forwarding_to_tab_strip_ = true;
scoped_ptr<views::DropTargetEvent> mapped_event(
- MapEventToTabStrip(event, event.GetData()));
+ MapEventToTabStrip(event, event.data()));
tabstrip()->OnDragEntered(*mapped_event.get());
}
}
@@ -64,7 +64,7 @@ void BrowserRootView::OnDragEntered(const views::DropTargetEvent& event) {
int BrowserRootView::OnDragUpdated(const views::DropTargetEvent& event) {
if (ShouldForwardToTabStrip(event)) {
scoped_ptr<views::DropTargetEvent> mapped_event(
- MapEventToTabStrip(event, event.GetData()));
+ MapEventToTabStrip(event, event.data()));
if (!forwarding_to_tab_strip_) {
tabstrip()->OnDragEntered(*mapped_event.get());
forwarding_to_tab_strip_ = true;
@@ -94,9 +94,9 @@ int BrowserRootView::OnPerformDrop(const views::DropTargetEvent& event) {
GURL url;
std::wstring title;
ui::OSExchangeData mapped_data;
- if (!event.GetData().GetURLAndTitle(&url, &title) || !url.is_valid()) {
+ if (!event.data().GetURLAndTitle(&url, &title) || !url.is_valid()) {
// The url isn't valid. Use the paste and go url.
- if (GetPasteAndGoURL(event.GetData(), &url))
+ if (GetPasteAndGoURL(event.data(), &url))
mapped_data.SetURL(url, std::wstring());
// else case: couldn't extract a url or 'paste and go' url. This ends up
// passing through an ui::OSExchangeData with nothing in it. We need to do
@@ -129,7 +129,7 @@ views::DropTargetEvent* BrowserRootView::MapEventToTabStrip(
ConvertPointToView(this, tabstrip(), &tab_strip_loc);
return new views::DropTargetEvent(data, tab_strip_loc.x(),
tab_strip_loc.y(),
- event.GetSourceOperations());
+ event.source_operations());
}
BaseTabStrip* BrowserRootView::tabstrip() const {
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index a4ab18c..3f34a24 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -1258,7 +1258,7 @@ bool BrowserView::PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event,
// it'll be best if we can unify these conversion tables.
// See http://crbug.com/54315
views::KeyEvent views_event(event.os_event);
- views::Accelerator accelerator(views_event.GetKeyCode(),
+ views::Accelerator accelerator(views_event.key_code(),
views_event.IsShiftDown(),
views_event.IsControlDown(),
views_event.IsAltDown());
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc
index 6634354..08188c6 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -697,13 +697,13 @@ void LocationBarView::SelectAll() {
bool LocationBarView::OnMousePressed(const views::MouseEvent& event) {
UINT msg;
if (event.IsLeftMouseButton()) {
- msg = (event.GetFlags() & views::MouseEvent::EF_IS_DOUBLE_CLICK) ?
+ msg = (event.flags() & views::MouseEvent::EF_IS_DOUBLE_CLICK) ?
WM_LBUTTONDBLCLK : WM_LBUTTONDOWN;
} else if (event.IsMiddleMouseButton()) {
- msg = (event.GetFlags() & views::MouseEvent::EF_IS_DOUBLE_CLICK) ?
+ msg = (event.flags() & views::MouseEvent::EF_IS_DOUBLE_CLICK) ?
WM_MBUTTONDBLCLK : WM_MBUTTONDOWN;
} else if (event.IsRightMouseButton()) {
- msg = (event.GetFlags() & views::MouseEvent::EF_IS_DOUBLE_CLICK) ?
+ msg = (event.flags() & views::MouseEvent::EF_IS_DOUBLE_CLICK) ?
WM_RBUTTONDBLCLK : WM_RBUTTONDOWN;
} else {
NOTREACHED();
diff --git a/chrome/browser/ui/views/location_bar/page_action_image_view.cc b/chrome/browser/ui/views/location_bar/page_action_image_view.cc
index e867091..bcfe51a 100644
--- a/chrome/browser/ui/views/location_bar/page_action_image_view.cc
+++ b/chrome/browser/ui/views/location_bar/page_action_image_view.cc
@@ -140,8 +140,7 @@ void PageActionImageView::OnMouseReleased(const views::MouseEvent& event,
}
bool PageActionImageView::OnKeyPressed(const views::KeyEvent& e) {
- if (e.GetKeyCode() == ui::VKEY_SPACE ||
- e.GetKeyCode() == ui::VKEY_RETURN) {
+ if (e.key_code() == ui::VKEY_SPACE || e.key_code() == ui::VKEY_RETURN) {
ExecuteAction(1, false);
return true;
}
diff --git a/chrome/browser/ui/views/location_bar/star_view.cc b/chrome/browser/ui/views/location_bar/star_view.cc
index c7bacbeb..886aec2 100644
--- a/chrome/browser/ui/views/location_bar/star_view.cc
+++ b/chrome/browser/ui/views/location_bar/star_view.cc
@@ -59,8 +59,7 @@ void StarView::OnMouseReleased(const views::MouseEvent& event, bool canceled) {
}
bool StarView::OnKeyPressed(const views::KeyEvent& e) {
- if (e.GetKeyCode() == ui::VKEY_SPACE ||
- e.GetKeyCode() == ui::VKEY_RETURN) {
+ if (e.key_code() == ui::VKEY_SPACE || e.key_code() == ui::VKEY_RETURN) {
command_updater_->ExecuteCommand(IDC_BOOKMARK_PAGE);
return true;
}
diff --git a/chrome/browser/ui/views/options/cookies_view.cc b/chrome/browser/ui/views/options/cookies_view.cc
index 83040e5..5b9c9e3 100644
--- a/chrome/browser/ui/views/options/cookies_view.cc
+++ b/chrome/browser/ui/views/options/cookies_view.cc
@@ -145,9 +145,9 @@ void CookiesView::ContentsChanged(views::Textfield* sender,
bool CookiesView::HandleKeyEvent(views::Textfield* sender,
const views::KeyEvent& key_event) {
- if (key_event.GetKeyCode() == ui::VKEY_ESCAPE) {
+ if (key_event.key_code() == ui::VKEY_ESCAPE) {
ResetSearchQuery();
- } else if (key_event.GetKeyCode() == ui::VKEY_RETURN) {
+ } else if (key_event.key_code() == ui::VKEY_RETURN) {
search_update_factory_.RevokeAll();
UpdateSearchResults();
}
diff --git a/chrome/browser/ui/views/tabs/tab_strip.cc b/chrome/browser/ui/views/tabs/tab_strip.cc
index eca1ef9..84d7517 100644
--- a/chrome/browser/ui/views/tabs/tab_strip.cc
+++ b/chrome/browser/ui/views/tabs/tab_strip.cc
@@ -355,7 +355,7 @@ int TabStrip::OnPerformDrop(const DropTargetEvent& event) {
GURL url;
std::wstring title;
- if (!event.GetData().GetURLAndTitle(&url, &title) || !url.is_valid())
+ if (!event.data().GetURLAndTitle(&url, &title) || !url.is_valid())
return ui::DragDropTypes::DRAG_NONE;
controller()->PerformDrop(drop_before, drop_index, url);
@@ -758,7 +758,7 @@ void TabStrip::SetDropIndex(int tab_data_index, bool drop_before) {
}
int TabStrip::GetDropEffect(const views::DropTargetEvent& event) {
- const int source_ops = event.GetSourceOperations();
+ const int source_ops = event.source_operations();
if (source_ops & ui::DragDropTypes::DRAG_COPY)
return ui::DragDropTypes::DRAG_COPY;
if (source_ops & ui::DragDropTypes::DRAG_LINK)