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

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: try again 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
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 566 matching lines...) Expand 10 before | Expand all | Expand 10 after
997 const bool metro_mode = 993 const bool metro_mode =
998 browser_->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH ? 994 browser_->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH ?
999 true : false; 995 true : false;
1000 #endif 996 #endif
1001 command_updater_.UpdateCommandEnabled(IDC_METRO_SNAP_ENABLE, metro_mode); 997 command_updater_.UpdateCommandEnabled(IDC_METRO_SNAP_ENABLE, metro_mode);
1002 command_updater_.UpdateCommandEnabled(IDC_METRO_SNAP_DISABLE, metro_mode); 998 command_updater_.UpdateCommandEnabled(IDC_METRO_SNAP_DISABLE, metro_mode);
1003 int restart_mode = metro_mode ? 999 int restart_mode = metro_mode ?
1004 IDC_WIN8_DESKTOP_RESTART : IDC_WIN8_METRO_RESTART; 1000 IDC_WIN8_DESKTOP_RESTART : IDC_WIN8_METRO_RESTART;
1005 command_updater_.UpdateCommandEnabled(restart_mode, normal_window); 1001 command_updater_.UpdateCommandEnabled(restart_mode, normal_window);
1006 #endif 1002 #endif
1007 command_updater_.UpdateCommandEnabled(IDC_TABPOSE, normal_window);
1008 1003
1009 // Show various bits of UI 1004 // Show various bits of UI
1010 command_updater_.UpdateCommandEnabled(IDC_CLEAR_BROWSING_DATA, normal_window); 1005 command_updater_.UpdateCommandEnabled(IDC_CLEAR_BROWSING_DATA, normal_window);
1011 1006
1012 // The upgrade entry and the view incompatibility entry should always be 1007 // The upgrade entry and the view incompatibility entry should always be
1013 // enabled. Whether they are visible is a separate matter determined on menu 1008 // enabled. Whether they are visible is a separate matter determined on menu
1014 // show. 1009 // show.
1015 command_updater_.UpdateCommandEnabled(IDC_UPGRADE_DIALOG, true); 1010 command_updater_.UpdateCommandEnabled(IDC_UPGRADE_DIALOG, true);
1016 command_updater_.UpdateCommandEnabled(IDC_VIEW_INCOMPATIBILITIES, true); 1011 command_updater_.UpdateCommandEnabled(IDC_VIEW_INCOMPATIBILITIES, true);
1017 1012
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
1344 1339
1345 BrowserWindow* BrowserCommandController::window() { 1340 BrowserWindow* BrowserCommandController::window() {
1346 return browser_->window(); 1341 return browser_->window();
1347 } 1342 }
1348 1343
1349 Profile* BrowserCommandController::profile() { 1344 Profile* BrowserCommandController::profile() {
1350 return browser_->profile(); 1345 return browser_->profile();
1351 } 1346 }
1352 1347
1353 } // namespace chrome 1348 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698