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

Side by Side Diff: chrome/browser/ui/browser_command_controller.cc

Issue 12089068: Revert 179554 - suspected to break browser_tests on Mac 10.6 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 10 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/browser.cc ('k') | chrome/browser/ui/browser_commands_mac.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/browser_command_controller.h" 5 #include "chrome/browser/ui/browser_command_controller.h"
6 6
7 #include "chrome/app/chrome_command_ids.h" 7 #include "chrome/app/chrome_command_ids.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/defaults.h" 9 #include "chrome/browser/defaults.h"
10 #include "chrome/browser/extensions/extension_service.h" 10 #include "chrome/browser/extensions/extension_service.h"
(...skipping 21 matching lines...) Expand all
32 #include "content/public/browser/navigation_controller.h" 32 #include "content/public/browser/navigation_controller.h"
33 #include "content/public/browser/navigation_entry.h" 33 #include "content/public/browser/navigation_entry.h"
34 #include "content/public/browser/notification_details.h" 34 #include "content/public/browser/notification_details.h"
35 #include "content/public/browser/notification_source.h" 35 #include "content/public/browser/notification_source.h"
36 #include "content/public/browser/user_metrics.h" 36 #include "content/public/browser/user_metrics.h"
37 #include "content/public/browser/web_contents.h" 37 #include "content/public/browser/web_contents.h"
38 #include "content/public/common/content_restriction.h" 38 #include "content/public/common/content_restriction.h"
39 #include "content/public/common/url_constants.h" 39 #include "content/public/common/url_constants.h"
40 #include "ui/base/keycodes/keyboard_codes.h" 40 #include "ui/base/keycodes/keyboard_codes.h"
41 41
42 #if defined(OS_MACOSX)
43 #include "chrome/browser/ui/browser_commands_mac.h"
44 #endif
45
46 #if defined(OS_WIN) 42 #if defined(OS_WIN)
47 #include "base/win/metro.h" 43 #include "base/win/metro.h"
48 #endif 44 #endif
49 45
50 #if defined(USE_ASH) 46 #if defined(USE_ASH)
51 #include "chrome/browser/ui/ash/ash_util.h" 47 #include "chrome/browser/ui/ash/ash_util.h"
52 #endif 48 #endif
53 49
54 using content::NavigationEntry; 50 using content::NavigationEntry;
55 using content::NavigationController; 51 using content::NavigationController;
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 case IDC_DUPLICATE_TAB: 414 case IDC_DUPLICATE_TAB:
419 DuplicateTab(browser_); 415 DuplicateTab(browser_);
420 break; 416 break;
421 case IDC_RESTORE_TAB: 417 case IDC_RESTORE_TAB:
422 RestoreTab(browser_); 418 RestoreTab(browser_);
423 break; 419 break;
424 case IDC_SHOW_AS_TAB: 420 case IDC_SHOW_AS_TAB:
425 ConvertPopupToTabbedBrowser(browser_); 421 ConvertPopupToTabbedBrowser(browser_);
426 break; 422 break;
427 case IDC_FULLSCREEN: 423 case IDC_FULLSCREEN:
428 #if defined(OS_MACOSX)
429 chrome::ToggleFullscreenWithChrome(browser_);
430 #else
431 chrome::ToggleFullscreenMode(browser_); 424 chrome::ToggleFullscreenMode(browser_);
432 #endif
433 break; 425 break;
434 426
435 #if defined(USE_ASH) 427 #if defined(USE_ASH)
436 case IDC_TOGGLE_ASH_DESKTOP: 428 case IDC_TOGGLE_ASH_DESKTOP:
437 chrome::ToggleAshDesktop(); 429 chrome::ToggleAshDesktop();
438 break; 430 break;
439 #endif 431 #endif
440 432
441 #if defined(OS_WIN) 433 #if defined(OS_WIN)
442 // Windows 8 specific commands. 434 // Windows 8 specific commands.
443 case IDC_METRO_SNAP_ENABLE: 435 case IDC_METRO_SNAP_ENABLE:
444 browser_->SetMetroSnapMode(true); 436 browser_->SetMetroSnapMode(true);
445 break; 437 break;
446 case IDC_METRO_SNAP_DISABLE: 438 case IDC_METRO_SNAP_DISABLE:
447 browser_->SetMetroSnapMode(false); 439 browser_->SetMetroSnapMode(false);
448 break; 440 break;
449 case IDC_WIN8_DESKTOP_RESTART: 441 case IDC_WIN8_DESKTOP_RESTART:
450 browser::AttemptRestartWithModeSwitch(); 442 browser::AttemptRestartWithModeSwitch();
451 content::RecordAction(content::UserMetricsAction("Win8DesktopRestart")); 443 content::RecordAction(content::UserMetricsAction("Win8DesktopRestart"));
452 break; 444 break;
453 case IDC_WIN8_METRO_RESTART: 445 case IDC_WIN8_METRO_RESTART:
454 new SwichToMetroUIHandler; 446 new SwichToMetroUIHandler;
455 content::RecordAction(content::UserMetricsAction("Win8MetroRestart")); 447 content::RecordAction(content::UserMetricsAction("Win8MetroRestart"));
456 break; 448 break;
457 #endif 449 #endif
458 450
459 #if defined(OS_MACOSX) 451 #if defined(OS_MACOSX)
460 case IDC_PRESENTATION_MODE: 452 case IDC_PRESENTATION_MODE:
461 chrome::ToggleFullscreenMode(browser_); 453 browser_->TogglePresentationMode();
462 break; 454 break;
463 #endif 455 #endif
464 case IDC_EXIT: 456 case IDC_EXIT:
465 Exit(); 457 Exit();
466 break; 458 break;
467 459
468 // Page-related commands 460 // Page-related commands
469 case IDC_SAVE_PAGE: 461 case IDC_SAVE_PAGE:
470 SavePage(browser_); 462 SavePage(browser_);
471 break; 463 break;
(...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after
1255 1247
1256 BrowserWindow* BrowserCommandController::window() { 1248 BrowserWindow* BrowserCommandController::window() {
1257 return browser_->window(); 1249 return browser_->window();
1258 } 1250 }
1259 1251
1260 Profile* BrowserCommandController::profile() { 1252 Profile* BrowserCommandController::profile() {
1261 return browser_->profile(); 1253 return browser_->profile();
1262 } 1254 }
1263 1255
1264 } // namespace chrome 1256 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/browser_commands_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698