OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/reload_button.h" | 5 #include "chrome/browser/ui/views/reload_button.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/event_disposition.h" | 10 #include "chrome/browser/event_disposition.h" |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 &ReloadButton::OnDoubleClickTimer); | 143 &ReloadButton::OnDoubleClickTimer); |
144 | 144 |
145 ExecuteBrowserCommand(command, flags); | 145 ExecuteBrowserCommand(command, flags); |
146 ++testing_reload_count_; | 146 ++testing_reload_count_; |
147 } | 147 } |
148 } | 148 } |
149 | 149 |
150 //////////////////////////////////////////////////////////////////////////////// | 150 //////////////////////////////////////////////////////////////////////////////// |
151 // ReloadButton, View overrides: | 151 // ReloadButton, View overrides: |
152 | 152 |
153 void ReloadButton::OnMouseExited(const views::MouseEvent& event) { | 153 void ReloadButton::OnMouseExited(const ui::MouseEvent& event) { |
154 ButtonDropDown::OnMouseExited(event); | 154 ButtonDropDown::OnMouseExited(event); |
155 if (!IsMenuShowing()) | 155 if (!IsMenuShowing()) |
156 ChangeMode(intended_mode_, true); | 156 ChangeMode(intended_mode_, true); |
157 } | 157 } |
158 | 158 |
159 bool ReloadButton::GetTooltipText(const gfx::Point& p, | 159 bool ReloadButton::GetTooltipText(const gfx::Point& p, |
160 string16* tooltip) const { | 160 string16* tooltip) const { |
161 int reload_tooltip = menu_enabled_ ? | 161 int reload_tooltip = menu_enabled_ ? |
162 IDS_TOOLTIP_RELOAD_WITH_MENU : IDS_TOOLTIP_RELOAD; | 162 IDS_TOOLTIP_RELOAD_WITH_MENU : IDS_TOOLTIP_RELOAD; |
163 int text_id = (visible_mode_ == MODE_RELOAD) ? | 163 int text_id = (visible_mode_ == MODE_RELOAD) ? |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 | 268 |
269 void ReloadButton::OnDoubleClickTimer() { | 269 void ReloadButton::OnDoubleClickTimer() { |
270 if (!IsMenuShowing()) | 270 if (!IsMenuShowing()) |
271 ChangeMode(intended_mode_, false); | 271 ChangeMode(intended_mode_, false); |
272 } | 272 } |
273 | 273 |
274 void ReloadButton::OnStopToReloadTimer() { | 274 void ReloadButton::OnStopToReloadTimer() { |
275 DCHECK(!IsMenuShowing()); | 275 DCHECK(!IsMenuShowing()); |
276 ChangeMode(intended_mode_, true); | 276 ChangeMode(intended_mode_, true); |
277 } | 277 } |
OLD | NEW |