| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/views/location_bar/star_view.h" | 5 #include "chrome/browser/views/location_bar/star_view.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
| 9 #include "chrome/app/chrome_dll_resource.h" | 9 #include "chrome/app/chrome_dll_resource.h" |
| 10 #include "chrome/browser/command_updater.h" | 10 #include "chrome/browser/command_updater.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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() == base::VKEY_SPACE || | 62 if (e.GetKeyCode() == app::VKEY_SPACE || |
| 63 e.GetKeyCode() == base::VKEY_RETURN) { | 63 e.GetKeyCode() == app::VKEY_RETURN) { |
| 64 command_updater_->ExecuteCommand(IDC_BOOKMARK_PAGE); | 64 command_updater_->ExecuteCommand(IDC_BOOKMARK_PAGE); |
| 65 return true; | 65 return true; |
| 66 } | 66 } |
| 67 return false; | 67 return false; |
| 68 } | 68 } |
| 69 | 69 |
| 70 void StarView::InfoBubbleClosing(InfoBubble* info_bubble, | 70 void StarView::InfoBubbleClosing(InfoBubble* info_bubble, |
| 71 bool closed_by_escape) { | 71 bool closed_by_escape) { |
| 72 } | 72 } |
| 73 | 73 |
| 74 bool StarView::CloseOnEscape() { | 74 bool StarView::CloseOnEscape() { |
| 75 return true; | 75 return true; |
| 76 } | 76 } |
| OLD | NEW |