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

Side by Side Diff: chrome/browser/ui/views/location_bar/star_view.cc

Issue 6480001: Migrate Event API methods to Google Style. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 months 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/location_bar/star_view.h" 5 #include "chrome/browser/ui/views/location_bar/star_view.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/app/chrome_command_ids.h" 8 #include "chrome/app/chrome_command_ids.h"
9 #include "chrome/browser/command_updater.h" 9 #include "chrome/browser/command_updater.h"
10 #include "chrome/browser/ui/view_ids.h" 10 #include "chrome/browser/ui/view_ids.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 // for buttons. 52 // for buttons.
53 return true; 53 return true;
54 } 54 }
55 55
56 void StarView::OnMouseReleased(const views::MouseEvent& event, bool canceled) { 56 void StarView::OnMouseReleased(const views::MouseEvent& event, bool canceled) {
57 if (!canceled && HitTest(event.location())) 57 if (!canceled && HitTest(event.location()))
58 command_updater_->ExecuteCommand(IDC_BOOKMARK_PAGE); 58 command_updater_->ExecuteCommand(IDC_BOOKMARK_PAGE);
59 } 59 }
60 60
61 bool StarView::OnKeyPressed(const views::KeyEvent& e) { 61 bool StarView::OnKeyPressed(const views::KeyEvent& e) {
62 if (e.GetKeyCode() == ui::VKEY_SPACE || 62 if (e.key_code() == ui::VKEY_SPACE || e.key_code() == ui::VKEY_RETURN) {
63 e.GetKeyCode() == ui::VKEY_RETURN) {
64 command_updater_->ExecuteCommand(IDC_BOOKMARK_PAGE); 63 command_updater_->ExecuteCommand(IDC_BOOKMARK_PAGE);
65 return true; 64 return true;
66 } 65 }
67 return false; 66 return false;
68 } 67 }
69 68
70 void StarView::InfoBubbleClosing(InfoBubble* info_bubble, 69 void StarView::InfoBubbleClosing(InfoBubble* info_bubble,
71 bool closed_by_escape) { 70 bool closed_by_escape) {
72 } 71 }
73 72
74 bool StarView::CloseOnEscape() { 73 bool StarView::CloseOnEscape() {
75 return true; 74 return true;
76 } 75 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698