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

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

Issue 12096059: Revert 179615 - didn't help by itself. (May need another revert for r179399) (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
42 #if defined(OS_WIN) 46 #if defined(OS_WIN)
43 #include "base/win/metro.h" 47 #include "base/win/metro.h"
44 #endif 48 #endif
45 49
46 #if defined(USE_ASH) 50 #if defined(USE_ASH)
47 #include "chrome/browser/ui/ash/ash_util.h" 51 #include "chrome/browser/ui/ash/ash_util.h"
48 #endif 52 #endif
49 53
50 using content::NavigationEntry; 54 using content::NavigationEntry;
51 using content::NavigationController; 55 using content::NavigationController;
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 case IDC_DUPLICATE_TAB: 418 case IDC_DUPLICATE_TAB:
415 DuplicateTab(browser_); 419 DuplicateTab(browser_);
416 break; 420 break;
417 case IDC_RESTORE_TAB: 421 case IDC_RESTORE_TAB:
418 RestoreTab(browser_); 422 RestoreTab(browser_);
419 break; 423 break;
420 case IDC_SHOW_AS_TAB: 424 case IDC_SHOW_AS_TAB:
421 ConvertPopupToTabbedBrowser(browser_); 425 ConvertPopupToTabbedBrowser(browser_);
422 break; 426 break;
423 case IDC_FULLSCREEN: 427 case IDC_FULLSCREEN:
428 #if defined(OS_MACOSX)
429 chrome::ToggleFullscreenWithChrome(browser_);
430 #else
424 chrome::ToggleFullscreenMode(browser_); 431 chrome::ToggleFullscreenMode(browser_);
432 #endif
425 break; 433 break;
426 434
427 #if defined(USE_ASH) 435 #if defined(USE_ASH)
428 case IDC_TOGGLE_ASH_DESKTOP: 436 case IDC_TOGGLE_ASH_DESKTOP:
429 chrome::ToggleAshDesktop(); 437 chrome::ToggleAshDesktop();
430 break; 438 break;
431 #endif 439 #endif
432 440
433 #if defined(OS_WIN) 441 #if defined(OS_WIN)
434 // Windows 8 specific commands. 442 // Windows 8 specific commands.
435 case IDC_METRO_SNAP_ENABLE: 443 case IDC_METRO_SNAP_ENABLE:
436 browser_->SetMetroSnapMode(true); 444 browser_->SetMetroSnapMode(true);
437 break; 445 break;
438 case IDC_METRO_SNAP_DISABLE: 446 case IDC_METRO_SNAP_DISABLE:
439 browser_->SetMetroSnapMode(false); 447 browser_->SetMetroSnapMode(false);
440 break; 448 break;
441 case IDC_WIN8_DESKTOP_RESTART: 449 case IDC_WIN8_DESKTOP_RESTART:
442 browser::AttemptRestartWithModeSwitch(); 450 browser::AttemptRestartWithModeSwitch();
443 content::RecordAction(content::UserMetricsAction("Win8DesktopRestart")); 451 content::RecordAction(content::UserMetricsAction("Win8DesktopRestart"));
444 break; 452 break;
445 case IDC_WIN8_METRO_RESTART: 453 case IDC_WIN8_METRO_RESTART:
446 new SwichToMetroUIHandler; 454 new SwichToMetroUIHandler;
447 content::RecordAction(content::UserMetricsAction("Win8MetroRestart")); 455 content::RecordAction(content::UserMetricsAction("Win8MetroRestart"));
448 break; 456 break;
449 #endif 457 #endif
450 458
451 #if defined(OS_MACOSX) 459 #if defined(OS_MACOSX)
452 case IDC_PRESENTATION_MODE: 460 case IDC_PRESENTATION_MODE:
453 browser_->TogglePresentationMode(); 461 chrome::ToggleFullscreenMode(browser_);
454 break; 462 break;
455 #endif 463 #endif
456 case IDC_EXIT: 464 case IDC_EXIT:
457 Exit(); 465 Exit();
458 break; 466 break;
459 467
460 // Page-related commands 468 // Page-related commands
461 case IDC_SAVE_PAGE: 469 case IDC_SAVE_PAGE:
462 SavePage(browser_); 470 SavePage(browser_);
463 break; 471 break;
(...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after
1247 1255
1248 BrowserWindow* BrowserCommandController::window() { 1256 BrowserWindow* BrowserCommandController::window() {
1249 return browser_->window(); 1257 return browser_->window();
1250 } 1258 }
1251 1259
1252 Profile* BrowserCommandController::profile() { 1260 Profile* BrowserCommandController::profile() {
1253 return browser_->profile(); 1261 return browser_->profile();
1254 } 1262 }
1255 1263
1256 } // namespace chrome 1264 } // 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