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

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

Issue 154083008: Remove Tabpose feature on mac, and supporting infrastructure (PaintAtSize) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, merge Created 6 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/thumbnails/thumbnail_tab_helper.cc ('k') | chrome/browser/ui/browser_commands.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 "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "chrome/app/chrome_command_ids.h" 9 #include "chrome/app/chrome_command_ids.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 if (window()->IsFullscreen() && command_id == IDC_FULLSCREEN) 283 if (window()->IsFullscreen() && command_id == IDC_FULLSCREEN)
284 return true; 284 return true;
285 return command_id == IDC_CLOSE_TAB || 285 return command_id == IDC_CLOSE_TAB ||
286 command_id == IDC_CLOSE_WINDOW || 286 command_id == IDC_CLOSE_WINDOW ||
287 command_id == IDC_NEW_INCOGNITO_WINDOW || 287 command_id == IDC_NEW_INCOGNITO_WINDOW ||
288 command_id == IDC_NEW_TAB || 288 command_id == IDC_NEW_TAB ||
289 command_id == IDC_NEW_WINDOW || 289 command_id == IDC_NEW_WINDOW ||
290 command_id == IDC_RESTORE_TAB || 290 command_id == IDC_RESTORE_TAB ||
291 command_id == IDC_SELECT_NEXT_TAB || 291 command_id == IDC_SELECT_NEXT_TAB ||
292 command_id == IDC_SELECT_PREVIOUS_TAB || 292 command_id == IDC_SELECT_PREVIOUS_TAB ||
293 command_id == IDC_TABPOSE ||
294 command_id == IDC_EXIT; 293 command_id == IDC_EXIT;
295 } 294 }
296 295
297 void BrowserCommandController::SetBlockCommandExecution(bool block) { 296 void BrowserCommandController::SetBlockCommandExecution(bool block) {
298 block_command_execution_ = block; 297 block_command_execution_ = block;
299 if (block) { 298 if (block) {
300 last_blocked_command_id_ = -1; 299 last_blocked_command_id_ = -1;
301 last_blocked_command_disposition_ = CURRENT_TAB; 300 last_blocked_command_disposition_ = CURRENT_TAB;
302 } 301 }
303 } 302 }
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 break; 407 break;
409 case IDC_SELECT_NEXT_TAB: 408 case IDC_SELECT_NEXT_TAB:
410 content::RecordAction(base::UserMetricsAction("Accel_SelectNextTab")); 409 content::RecordAction(base::UserMetricsAction("Accel_SelectNextTab"));
411 SelectNextTab(browser_); 410 SelectNextTab(browser_);
412 break; 411 break;
413 case IDC_SELECT_PREVIOUS_TAB: 412 case IDC_SELECT_PREVIOUS_TAB:
414 content::RecordAction( 413 content::RecordAction(
415 base::UserMetricsAction("Accel_SelectPreviousTab")); 414 base::UserMetricsAction("Accel_SelectPreviousTab"));
416 SelectPreviousTab(browser_); 415 SelectPreviousTab(browser_);
417 break; 416 break;
418 case IDC_TABPOSE:
419 OpenTabpose(browser_);
420 break;
421 case IDC_MOVE_TAB_NEXT: 417 case IDC_MOVE_TAB_NEXT:
422 MoveTabNext(browser_); 418 MoveTabNext(browser_);
423 break; 419 break;
424 case IDC_MOVE_TAB_PREVIOUS: 420 case IDC_MOVE_TAB_PREVIOUS:
425 MoveTabPrevious(browser_); 421 MoveTabPrevious(browser_);
426 break; 422 break;
427 case IDC_SELECT_TAB_0: 423 case IDC_SELECT_TAB_0:
428 case IDC_SELECT_TAB_1: 424 case IDC_SELECT_TAB_1:
429 case IDC_SELECT_TAB_2: 425 case IDC_SELECT_TAB_2:
430 case IDC_SELECT_TAB_3: 426 case IDC_SELECT_TAB_3:
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
1009 const bool metro_mode = 1005 const bool metro_mode =
1010 browser_->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH ? 1006 browser_->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH ?
1011 true : false; 1007 true : false;
1012 #endif 1008 #endif
1013 command_updater_.UpdateCommandEnabled(IDC_METRO_SNAP_ENABLE, metro_mode); 1009 command_updater_.UpdateCommandEnabled(IDC_METRO_SNAP_ENABLE, metro_mode);
1014 command_updater_.UpdateCommandEnabled(IDC_METRO_SNAP_DISABLE, metro_mode); 1010 command_updater_.UpdateCommandEnabled(IDC_METRO_SNAP_DISABLE, metro_mode);
1015 int restart_mode = metro_mode ? 1011 int restart_mode = metro_mode ?
1016 IDC_WIN8_DESKTOP_RESTART : IDC_WIN8_METRO_RESTART; 1012 IDC_WIN8_DESKTOP_RESTART : IDC_WIN8_METRO_RESTART;
1017 command_updater_.UpdateCommandEnabled(restart_mode, normal_window); 1013 command_updater_.UpdateCommandEnabled(restart_mode, normal_window);
1018 #endif 1014 #endif
1019 command_updater_.UpdateCommandEnabled(IDC_TABPOSE, normal_window);
1020 1015
1021 // Show various bits of UI 1016 // Show various bits of UI
1022 command_updater_.UpdateCommandEnabled(IDC_CLEAR_BROWSING_DATA, normal_window); 1017 command_updater_.UpdateCommandEnabled(IDC_CLEAR_BROWSING_DATA, normal_window);
1023 1018
1024 // The upgrade entry and the view incompatibility entry should always be 1019 // The upgrade entry and the view incompatibility entry should always be
1025 // enabled. Whether they are visible is a separate matter determined on menu 1020 // enabled. Whether they are visible is a separate matter determined on menu
1026 // show. 1021 // show.
1027 command_updater_.UpdateCommandEnabled(IDC_UPGRADE_DIALOG, true); 1022 command_updater_.UpdateCommandEnabled(IDC_UPGRADE_DIALOG, true);
1028 command_updater_.UpdateCommandEnabled(IDC_VIEW_INCOMPATIBILITIES, true); 1023 command_updater_.UpdateCommandEnabled(IDC_VIEW_INCOMPATIBILITIES, true);
1029 1024
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
1356 1351
1357 BrowserWindow* BrowserCommandController::window() { 1352 BrowserWindow* BrowserCommandController::window() {
1358 return browser_->window(); 1353 return browser_->window();
1359 } 1354 }
1360 1355
1361 Profile* BrowserCommandController::profile() { 1356 Profile* BrowserCommandController::profile() {
1362 return browser_->profile(); 1357 return browser_->profile();
1363 } 1358 }
1364 1359
1365 } // namespace chrome 1360 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/thumbnails/thumbnail_tab_helper.cc ('k') | chrome/browser/ui/browser_commands.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698