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

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: merge 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 2182 matching lines...) Expand 10 before | Expand all | Expand 10 after
2193 #if defined(OS_WIN) && !defined(USE_AURA) 2193 #if defined(OS_WIN) && !defined(USE_AURA)
2194 switch (app_command_id) { 2194 switch (app_command_id) {
2195 // NOTE: The order here matches the APPCOMMAND declaration order in the 2195 // NOTE: The order here matches the APPCOMMAND declaration order in the
2196 // Windows headers. 2196 // Windows headers.
2197 case APPCOMMAND_BROWSER_BACKWARD: return IDC_BACK; 2197 case APPCOMMAND_BROWSER_BACKWARD: return IDC_BACK;
2198 case APPCOMMAND_BROWSER_FORWARD: return IDC_FORWARD; 2198 case APPCOMMAND_BROWSER_FORWARD: return IDC_FORWARD;
2199 case APPCOMMAND_BROWSER_REFRESH: return IDC_RELOAD; 2199 case APPCOMMAND_BROWSER_REFRESH: return IDC_RELOAD;
2200 case APPCOMMAND_BROWSER_HOME: return IDC_HOME; 2200 case APPCOMMAND_BROWSER_HOME: return IDC_HOME;
2201 case APPCOMMAND_BROWSER_STOP: return IDC_STOP; 2201 case APPCOMMAND_BROWSER_STOP: return IDC_STOP;
2202 case APPCOMMAND_BROWSER_SEARCH: return IDC_FOCUS_SEARCH; 2202 case APPCOMMAND_BROWSER_SEARCH: return IDC_FOCUS_SEARCH;
2203 case APPCOMMAND_HELP: return IDC_HELP_PAGE; 2203 case APPCOMMAND_HELP: return IDC_HELP_PAGE_VIA_KEYBOARD;
2204 case APPCOMMAND_NEW: return IDC_NEW_TAB; 2204 case APPCOMMAND_NEW: return IDC_NEW_TAB;
2205 case APPCOMMAND_OPEN: return IDC_OPEN_FILE; 2205 case APPCOMMAND_OPEN: return IDC_OPEN_FILE;
2206 case APPCOMMAND_CLOSE: return IDC_CLOSE_TAB; 2206 case APPCOMMAND_CLOSE: return IDC_CLOSE_TAB;
2207 case APPCOMMAND_SAVE: return IDC_SAVE_PAGE; 2207 case APPCOMMAND_SAVE: return IDC_SAVE_PAGE;
2208 case APPCOMMAND_PRINT: return IDC_PRINT; 2208 case APPCOMMAND_PRINT: return IDC_PRINT;
2209 case APPCOMMAND_COPY: return IDC_COPY; 2209 case APPCOMMAND_COPY: return IDC_COPY;
2210 case APPCOMMAND_CUT: return IDC_CUT; 2210 case APPCOMMAND_CUT: return IDC_CUT;
2211 case APPCOMMAND_PASTE: return IDC_PASTE; 2211 case APPCOMMAND_PASTE: return IDC_PASTE;
2212 2212
2213 // TODO(pkasting): http://b/1113069 Handle these. 2213 // TODO(pkasting): http://b/1113069 Handle these.
(...skipping 29 matching lines...) Expand all
2243 plugin_message_response_timeout); 2243 plugin_message_response_timeout);
2244 pref_service->SetInteger(prefs::kHungPluginDetectFrequency, 2244 pref_service->SetInteger(prefs::kHungPluginDetectFrequency,
2245 hung_plugin_detect_freq); 2245 hung_plugin_detect_freq);
2246 } 2246 }
2247 #endif 2247 #endif
2248 } 2248 }
2249 2249
2250 void BrowserView::UpdateAcceleratorMetrics( 2250 void BrowserView::UpdateAcceleratorMetrics(
2251 const ui::Accelerator& accelerator, int command_id) { 2251 const ui::Accelerator& accelerator, int command_id) {
2252 const ui::KeyboardCode key_code = accelerator.key_code(); 2252 const ui::KeyboardCode key_code = accelerator.key_code();
2253 if (command_id == IDC_HELP_PAGE && key_code == ui::VKEY_F1) 2253 if (command_id == IDC_HELP_PAGE_VIA_KEYBOARD && key_code == ui::VKEY_F1)
2254 content::RecordAction(UserMetricsAction("ShowHelpTabViaF1")); 2254 content::RecordAction(UserMetricsAction("ShowHelpTabViaF1"));
2255 2255
2256 #if defined(OS_CHROMEOS) 2256 #if defined(OS_CHROMEOS)
2257 // Collect information about the relative popularity of various accelerators 2257 // Collect information about the relative popularity of various accelerators
2258 // on Chrome OS. 2258 // on Chrome OS.
2259 switch (command_id) { 2259 switch (command_id) {
2260 case IDC_BACK: 2260 case IDC_BACK:
2261 if (key_code == ui::VKEY_BACK) 2261 if (key_code == ui::VKEY_BACK)
2262 content::RecordAction(UserMetricsAction("Accel_Back_Backspace")); 2262 content::RecordAction(UserMetricsAction("Accel_Back_Backspace"));
2263 else if (key_code == ui::VKEY_F1) 2263 else if (key_code == ui::VKEY_F1)
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
2433 this, 2433 this,
2434 tab_contents->web_contents()->GetRenderViewHost(), 2434 tab_contents->web_contents()->GetRenderViewHost(),
2435 password_generator, 2435 password_generator,
2436 browser_.get(), 2436 browser_.get(),
2437 tab_contents->password_manager()); 2437 tab_contents->password_manager());
2438 2438
2439 views::BubbleDelegateView::CreateBubble(bubble); 2439 views::BubbleDelegateView::CreateBubble(bubble);
2440 bubble->SetAlignment(views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE); 2440 bubble->SetAlignment(views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE);
2441 bubble->Show(); 2441 bubble->Show();
2442 } 2442 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/accelerator_table.cc ('k') | chrome/browser/ui/webui/help/help_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698