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

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

Issue 10694060: browser: Move more files into chrome namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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) 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 int flags = mouse_event_flags(); 92 int flags = mouse_event_flags();
93 if (event.IsShiftDown() || event.IsControlDown()) { 93 if (event.IsShiftDown() || event.IsControlDown()) {
94 command = IDC_RELOAD_IGNORING_CACHE; 94 command = IDC_RELOAD_IGNORING_CACHE;
95 // Mask off Shift and Control so they don't affect the disposition below. 95 // Mask off Shift and Control so they don't affect the disposition below.
96 flags &= ~(ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN); 96 flags &= ~(ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN);
97 } else { 97 } else {
98 command = IDC_RELOAD; 98 command = IDC_RELOAD;
99 } 99 }
100 100
101 WindowOpenDisposition disposition = 101 WindowOpenDisposition disposition =
102 browser::DispositionFromEventFlags(flags); 102 chrome::DispositionFromEventFlags(flags);
103 if ((disposition == CURRENT_TAB) && location_bar_) { 103 if ((disposition == CURRENT_TAB) && location_bar_) {
104 // Forcibly reset the location bar, since otherwise it won't discard any 104 // Forcibly reset the location bar, since otherwise it won't discard any
105 // ongoing user edits, since it doesn't realize this is a user-initiated 105 // ongoing user edits, since it doesn't realize this is a user-initiated
106 // action. 106 // action.
107 location_bar_->Revert(); 107 location_bar_->Revert();
108 } 108 }
109 109
110 // Start a timer - while this timer is running, the reload button cannot be 110 // Start a timer - while this timer is running, the reload button cannot be
111 // changed to a stop button. We do not set |intended_mode_| to MODE_STOP 111 // changed to a stop button. We do not set |intended_mode_| to MODE_STOP
112 // here as the browser will do that when it actually starts loading (which 112 // here as the browser will do that when it actually starts loading (which
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 //////////////////////////////////////////////////////////////////////////////// 145 ////////////////////////////////////////////////////////////////////////////////
146 // ReloadButton, private: 146 // ReloadButton, private:
147 147
148 void ReloadButton::OnDoubleClickTimer() { 148 void ReloadButton::OnDoubleClickTimer() {
149 ChangeMode(intended_mode_, false); 149 ChangeMode(intended_mode_, false);
150 } 150 }
151 151
152 void ReloadButton::OnStopToReloadTimer() { 152 void ReloadButton::OnStopToReloadTimer() {
153 ChangeMode(intended_mode_, true); 153 ChangeMode(intended_mode_, true);
154 } 154 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/network_profile_bubble_view.cc ('k') | chrome/browser/ui/views/toolbar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698