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

Side by Side Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 10546072: Use different help URLs for menus, accelerators, and WebUI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ugh core file Created 8 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/frame/browser_view.h" 5 #include "chrome/browser/ui/views/frame/browser_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 2178 matching lines...) Expand 10 before | Expand all | Expand 10 after
2189 #if defined(OS_WIN) && !defined(USE_AURA) 2189 #if defined(OS_WIN) && !defined(USE_AURA)
2190 switch (app_command_id) { 2190 switch (app_command_id) {
2191 // NOTE: The order here matches the APPCOMMAND declaration order in the 2191 // NOTE: The order here matches the APPCOMMAND declaration order in the
2192 // Windows headers. 2192 // Windows headers.
2193 case APPCOMMAND_BROWSER_BACKWARD: return IDC_BACK; 2193 case APPCOMMAND_BROWSER_BACKWARD: return IDC_BACK;
2194 case APPCOMMAND_BROWSER_FORWARD: return IDC_FORWARD; 2194 case APPCOMMAND_BROWSER_FORWARD: return IDC_FORWARD;
2195 case APPCOMMAND_BROWSER_REFRESH: return IDC_RELOAD; 2195 case APPCOMMAND_BROWSER_REFRESH: return IDC_RELOAD;
2196 case APPCOMMAND_BROWSER_HOME: return IDC_HOME; 2196 case APPCOMMAND_BROWSER_HOME: return IDC_HOME;
2197 case APPCOMMAND_BROWSER_STOP: return IDC_STOP; 2197 case APPCOMMAND_BROWSER_STOP: return IDC_STOP;
2198 case APPCOMMAND_BROWSER_SEARCH: return IDC_FOCUS_SEARCH; 2198 case APPCOMMAND_BROWSER_SEARCH: return IDC_FOCUS_SEARCH;
2199 case APPCOMMAND_HELP: return IDC_HELP_PAGE; 2199 case APPCOMMAND_HELP: return IDC_HELP_PAGE_VIA_KEYBOARD;
Daniel Erat 2012/06/08 16:28:52 It's unclear to me from http://technet.microsoft.c
2200 case APPCOMMAND_NEW: return IDC_NEW_TAB; 2200 case APPCOMMAND_NEW: return IDC_NEW_TAB;
2201 case APPCOMMAND_OPEN: return IDC_OPEN_FILE; 2201 case APPCOMMAND_OPEN: return IDC_OPEN_FILE;
2202 case APPCOMMAND_CLOSE: return IDC_CLOSE_TAB; 2202 case APPCOMMAND_CLOSE: return IDC_CLOSE_TAB;
2203 case APPCOMMAND_SAVE: return IDC_SAVE_PAGE; 2203 case APPCOMMAND_SAVE: return IDC_SAVE_PAGE;
2204 case APPCOMMAND_PRINT: return IDC_PRINT; 2204 case APPCOMMAND_PRINT: return IDC_PRINT;
2205 case APPCOMMAND_COPY: return IDC_COPY; 2205 case APPCOMMAND_COPY: return IDC_COPY;
2206 case APPCOMMAND_CUT: return IDC_CUT; 2206 case APPCOMMAND_CUT: return IDC_CUT;
2207 case APPCOMMAND_PASTE: return IDC_PASTE; 2207 case APPCOMMAND_PASTE: return IDC_PASTE;
2208 2208
2209 // TODO(pkasting): http://b/1113069 Handle these. 2209 // TODO(pkasting): http://b/1113069 Handle these.
(...skipping 29 matching lines...) Expand all
2239 plugin_message_response_timeout); 2239 plugin_message_response_timeout);
2240 pref_service->SetInteger(prefs::kHungPluginDetectFrequency, 2240 pref_service->SetInteger(prefs::kHungPluginDetectFrequency,
2241 hung_plugin_detect_freq); 2241 hung_plugin_detect_freq);
2242 } 2242 }
2243 #endif 2243 #endif
2244 } 2244 }
2245 2245
2246 void BrowserView::UpdateAcceleratorMetrics( 2246 void BrowserView::UpdateAcceleratorMetrics(
2247 const ui::Accelerator& accelerator, int command_id) { 2247 const ui::Accelerator& accelerator, int command_id) {
2248 const ui::KeyboardCode key_code = accelerator.key_code(); 2248 const ui::KeyboardCode key_code = accelerator.key_code();
2249 if (command_id == IDC_HELP_PAGE && key_code == ui::VKEY_F1) 2249 if (command_id == IDC_HELP_PAGE_VIA_KEYBOARD && key_code == ui::VKEY_F1)
2250 content::RecordAction(UserMetricsAction("ShowHelpTabViaF1")); 2250 content::RecordAction(UserMetricsAction("ShowHelpTabViaF1"));
2251 2251
2252 #if defined(OS_CHROMEOS) 2252 #if defined(OS_CHROMEOS)
2253 // Collect information about the relative popularity of various accelerators 2253 // Collect information about the relative popularity of various accelerators
2254 // on Chrome OS. 2254 // on Chrome OS.
2255 switch (command_id) { 2255 switch (command_id) {
2256 case IDC_BACK: 2256 case IDC_BACK:
2257 if (key_code == ui::VKEY_BACK) 2257 if (key_code == ui::VKEY_BACK)
2258 content::RecordAction(UserMetricsAction("Accel_Back_Backspace")); 2258 content::RecordAction(UserMetricsAction("Accel_Back_Backspace"));
2259 else if (key_code == ui::VKEY_F1) 2259 else if (key_code == ui::VKEY_F1)
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
2429 this, 2429 this,
2430 web_contents->GetRenderViewHost(), 2430 web_contents->GetRenderViewHost(),
2431 password_generator, 2431 password_generator,
2432 browser_.get(), 2432 browser_.get(),
2433 wrapper->password_manager()); 2433 wrapper->password_manager());
2434 2434
2435 views::BubbleDelegateView::CreateBubble(bubble); 2435 views::BubbleDelegateView::CreateBubble(bubble);
2436 bubble->SetAlignment(views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE); 2436 bubble->SetAlignment(views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE);
2437 bubble->Show(); 2437 bubble->Show();
2438 } 2438 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698