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

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

Issue 16979002: Add ContextMenuSourceType to views::ContextMenuController::ShowContextMenuForView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch Created 7 years, 6 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/strings/utf_string_conversions.h" 7 #include "base/strings/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/search/search.h" 10 #include "chrome/browser/search/search.h"
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 } 163 }
164 164
165 const char* ReloadButton::GetClassName() const { 165 const char* ReloadButton::GetClassName() const {
166 return kViewClassName; 166 return kViewClassName;
167 } 167 }
168 168
169 bool ReloadButton::ShouldShowMenu() { 169 bool ReloadButton::ShouldShowMenu() {
170 return menu_enabled_ && (visible_mode_ == MODE_RELOAD); 170 return menu_enabled_ && (visible_mode_ == MODE_RELOAD);
171 } 171 }
172 172
173 void ReloadButton::ShowDropDownMenu() { 173 void ReloadButton::ShowDropDownMenu(ui::MenuSourceType source_type) {
174 ButtonDropDown::ShowDropDownMenu(); // Blocks. 174 ButtonDropDown::ShowDropDownMenu(source_type); // Blocks.
175 ChangeMode(intended_mode_, true); 175 ChangeMode(intended_mode_, true);
176 } 176 }
177 177
178 //////////////////////////////////////////////////////////////////////////////// 178 ////////////////////////////////////////////////////////////////////////////////
179 // ReloadButton, ui::SimpleMenuModel::Delegate overrides: 179 // ReloadButton, ui::SimpleMenuModel::Delegate overrides:
180 180
181 bool ReloadButton::IsCommandIdChecked(int command_id) const { 181 bool ReloadButton::IsCommandIdChecked(int command_id) const {
182 return false; 182 return false;
183 } 183 }
184 184
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 259
260 void ReloadButton::OnDoubleClickTimer() { 260 void ReloadButton::OnDoubleClickTimer() {
261 if (!IsMenuShowing()) 261 if (!IsMenuShowing())
262 ChangeMode(intended_mode_, false); 262 ChangeMode(intended_mode_, false);
263 } 263 }
264 264
265 void ReloadButton::OnStopToReloadTimer() { 265 void ReloadButton::OnStopToReloadTimer() {
266 DCHECK(!IsMenuShowing()); 266 DCHECK(!IsMenuShowing());
267 ChangeMode(intended_mode_, true); 267 ChangeMode(intended_mode_, true);
268 } 268 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/reload_button.h ('k') | chrome/browser/ui/views/status_icons/status_icon_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698