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

Side by Side Diff: chrome/browser/ui/views/reload_button.cc

Issue 10827271: Replace views::Event with ui::Event. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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
« no previous file with comments | « chrome/browser/ui/views/reload_button.h ('k') | chrome/browser/ui/views/sad_tab_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 } 105 }
106 106
107 SchedulePaint(); 107 SchedulePaint();
108 PreferredSizeChanged(); 108 PreferredSizeChanged();
109 } 109 }
110 110
111 //////////////////////////////////////////////////////////////////////////////// 111 ////////////////////////////////////////////////////////////////////////////////
112 // ReloadButton, views::ButtonListener implementation: 112 // ReloadButton, views::ButtonListener implementation:
113 113
114 void ReloadButton::ButtonPressed(views::Button* /* button */, 114 void ReloadButton::ButtonPressed(views::Button* /* button */,
115 const views::Event& event) { 115 const ui::Event& event) {
116 ClearPendingMenu(); 116 ClearPendingMenu();
117 117
118 if (visible_mode_ == MODE_STOP) { 118 if (visible_mode_ == MODE_STOP) {
119 if (command_updater_) 119 if (command_updater_)
120 command_updater_->ExecuteCommandWithDisposition(IDC_STOP, CURRENT_TAB); 120 command_updater_->ExecuteCommandWithDisposition(IDC_STOP, CURRENT_TAB);
121 // The user has clicked, so we can feel free to update the button, 121 // The user has clicked, so we can feel free to update the button,
122 // even if the mouse is still hovering. 122 // even if the mouse is still hovering.
123 ChangeMode(MODE_RELOAD, true); 123 ChangeMode(MODE_RELOAD, true);
124 } else if (!double_click_timer_.IsRunning()) { 124 } else if (!double_click_timer_.IsRunning()) {
125 // Shift-clicking or ctrl-clicking the reload button means we should ignore 125 // Shift-clicking or ctrl-clicking the reload button means we should ignore
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/reload_button.h ('k') | chrome/browser/ui/views/sad_tab_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698