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

Side by Side Diff: chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm

Issue 562603002: Move PageTransition from //content/public/common to //ui/base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 3 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
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 2046 matching lines...) Expand 10 before | Expand all | Expand 10 after
2057 WindowOpenDisposition disposition; 2057 WindowOpenDisposition disposition;
2058 [self droppingURLsAt:point 2058 [self droppingURLsAt:point
2059 givesIndex:&index 2059 givesIndex:&index
2060 disposition:&disposition]; 2060 disposition:&disposition];
2061 2061
2062 // Either insert a new tab or open in a current tab. 2062 // Either insert a new tab or open in a current tab.
2063 switch (disposition) { 2063 switch (disposition) {
2064 case NEW_FOREGROUND_TAB: { 2064 case NEW_FOREGROUND_TAB: {
2065 content::RecordAction(UserMetricsAction("Tab_DropURLBetweenTabs")); 2065 content::RecordAction(UserMetricsAction("Tab_DropURLBetweenTabs"));
2066 chrome::NavigateParams params(browser_, *url, 2066 chrome::NavigateParams params(browser_, *url,
2067 content::PAGE_TRANSITION_TYPED); 2067 ui::PAGE_TRANSITION_TYPED);
2068 params.disposition = disposition; 2068 params.disposition = disposition;
2069 params.tabstrip_index = index; 2069 params.tabstrip_index = index;
2070 params.tabstrip_add_types = 2070 params.tabstrip_add_types =
2071 TabStripModel::ADD_ACTIVE | TabStripModel::ADD_FORCE_INDEX; 2071 TabStripModel::ADD_ACTIVE | TabStripModel::ADD_FORCE_INDEX;
2072 chrome::Navigate(&params); 2072 chrome::Navigate(&params);
2073 break; 2073 break;
2074 } 2074 }
2075 case CURRENT_TAB: { 2075 case CURRENT_TAB: {
2076 content::RecordAction(UserMetricsAction("Tab_DropURLOnTab")); 2076 content::RecordAction(UserMetricsAction("Tab_DropURLOnTab"));
2077 OpenURLParams params( 2077 OpenURLParams params(
2078 *url, Referrer(), CURRENT_TAB, content::PAGE_TRANSITION_TYPED, false); 2078 *url, Referrer(), CURRENT_TAB, ui::PAGE_TRANSITION_TYPED, false);
2079 tabStripModel_->GetWebContentsAt(index)->OpenURL(params); 2079 tabStripModel_->GetWebContentsAt(index)->OpenURL(params);
2080 tabStripModel_->ActivateTabAt(index, true); 2080 tabStripModel_->ActivateTabAt(index, true);
2081 break; 2081 break;
2082 } 2082 }
2083 default: 2083 default:
2084 NOTIMPLEMENTED(); 2084 NOTIMPLEMENTED();
2085 } 2085 }
2086 } 2086 }
2087 2087
2088 // (URLDropTargetController protocol) 2088 // (URLDropTargetController protocol)
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
2309 } 2309 }
2310 2310
2311 NSRect GetSheetParentBoundsForParentView(NSView* view) { 2311 NSRect GetSheetParentBoundsForParentView(NSView* view) {
2312 // If the devtools view is open, it shrinks the size of the WebContents, so go 2312 // If the devtools view is open, it shrinks the size of the WebContents, so go
2313 // up the hierarchy to the devtools container view to avoid that. Note that 2313 // up the hierarchy to the devtools container view to avoid that. Note that
2314 // the devtools view is always in the hierarchy even if it is not open or it 2314 // the devtools view is always in the hierarchy even if it is not open or it
2315 // is detached. 2315 // is detached.
2316 NSView* devtools_view = [[[view superview] superview] superview]; 2316 NSView* devtools_view = [[[view superview] superview] superview];
2317 return [devtools_view convertRect:[devtools_view bounds] toView:nil]; 2317 return [devtools_view convertRect:[devtools_view bounds] toView:nil];
2318 } 2318 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/profiles/user_manager_mac.mm ('k') | chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698