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/cocoa/tabs/tab_strip_controller.mm

Issue 74133003: linux-aura: Restore middle-click on new-tab button behaviour. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tot-merge-nit Created 7 years, 1 month 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_tabstrip.cc ('k') | chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc » ('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 #import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h" 5 #import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h"
6 6
7 #import <QuartzCore/QuartzCore.h> 7 #import <QuartzCore/QuartzCore.h>
8 8
9 #include <cmath> 9 #include <cmath>
10 #include <limits> 10 #include <limits>
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after
668 [[controller view] setHidden:YES]; 668 [[controller view] setHidden:YES];
669 669
670 return controller; 670 return controller;
671 } 671 }
672 672
673 // (Private) Handles a click on the new tab button. 673 // (Private) Handles a click on the new tab button.
674 - (void)clickNewTabButton:(id)sender { 674 - (void)clickNewTabButton:(id)sender {
675 content::RecordAction(UserMetricsAction("NewTab_Button")); 675 content::RecordAction(UserMetricsAction("NewTab_Button"));
676 UMA_HISTOGRAM_ENUMERATION("Tab.NewTab", TabStripModel::NEW_TAB_BUTTON, 676 UMA_HISTOGRAM_ENUMERATION("Tab.NewTab", TabStripModel::NEW_TAB_BUTTON,
677 TabStripModel::NEW_TAB_ENUM_COUNT); 677 TabStripModel::NEW_TAB_ENUM_COUNT);
678 tabStripModel_->delegate()->AddBlankTabAt(-1, true); 678 tabStripModel_->delegate()->AddURLTabAt(GURL(), -1, true);
679 } 679 }
680 680
681 // (Private) Returns the number of open tabs in the tab strip. This is the 681 // (Private) Returns the number of open tabs in the tab strip. This is the
682 // number of TabControllers we know about (as there's a 1-to-1 mapping from 682 // number of TabControllers we know about (as there's a 1-to-1 mapping from
683 // these controllers to a tab) less the number of closing tabs. 683 // these controllers to a tab) less the number of closing tabs.
684 - (NSInteger)numberOfOpenTabs { 684 - (NSInteger)numberOfOpenTabs {
685 return static_cast<NSInteger>(tabStripModel_->count()); 685 return static_cast<NSInteger>(tabStripModel_->count());
686 } 686 }
687 687
688 // (Private) Returns the number of open, mini-tabs. 688 // (Private) Returns the number of open, mini-tabs.
(...skipping 1528 matching lines...) Expand 10 before | Expand all | Expand 10 after
2217 NSView* GetSheetParentViewForWebContents(WebContents* web_contents) { 2217 NSView* GetSheetParentViewForWebContents(WebContents* web_contents) {
2218 // View hierarchy of the contents view: 2218 // View hierarchy of the contents view:
2219 // NSView -- switchView, same for all tabs 2219 // NSView -- switchView, same for all tabs
2220 // +- NSView -- TabContentsController's view 2220 // +- NSView -- TabContentsController's view
2221 // +- TabContentsViewCocoa 2221 // +- TabContentsViewCocoa
2222 // 2222 //
2223 // Changing it? Do not forget to modify 2223 // Changing it? Do not forget to modify
2224 // -[TabStripController swapInTabAtIndex:] too. 2224 // -[TabStripController swapInTabAtIndex:] too.
2225 return [web_contents->GetView()->GetNativeView() superview]; 2225 return [web_contents->GetView()->GetNativeView() superview];
2226 } 2226 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_tabstrip.cc ('k') | chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698