OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <limits> | 9 #include <limits> |
10 #include <string> | 10 #include <string> |
(...skipping 1943 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1954 [self openURL:&url inView:view at:point]; | 1954 [self openURL:&url inView:view at:point]; |
1955 } | 1955 } |
1956 | 1956 |
1957 // (URLDropTargetController protocol) | 1957 // (URLDropTargetController protocol) |
1958 - (void)dropText:(NSString*)text inView:(NSView*)view at:(NSPoint)point { | 1958 - (void)dropText:(NSString*)text inView:(NSView*)view at:(NSPoint)point { |
1959 DCHECK_EQ(view, tabStripView_.get()); | 1959 DCHECK_EQ(view, tabStripView_.get()); |
1960 | 1960 |
1961 // If the input is plain text, classify the input and make the URL. | 1961 // If the input is plain text, classify the input and make the URL. |
1962 AutocompleteMatch match; | 1962 AutocompleteMatch match; |
1963 browser_->profile()->GetAutocompleteClassifier()->Classify( | 1963 browser_->profile()->GetAutocompleteClassifier()->Classify( |
1964 base::SysNSStringToUTF16(text), string16(), false, &match, NULL); | 1964 base::SysNSStringToUTF16(text), string16(), false, false, &match, NULL); |
1965 GURL url(match.destination_url); | 1965 GURL url(match.destination_url); |
1966 | 1966 |
1967 [self openURL:&url inView:view at:point]; | 1967 [self openURL:&url inView:view at:point]; |
1968 } | 1968 } |
1969 | 1969 |
1970 // (URLDropTargetController protocol) | 1970 // (URLDropTargetController protocol) |
1971 - (void)indicateDropURLsInView:(NSView*)view at:(NSPoint)point { | 1971 - (void)indicateDropURLsInView:(NSView*)view at:(NSPoint)point { |
1972 DCHECK_EQ(view, tabStripView_.get()); | 1972 DCHECK_EQ(view, tabStripView_.get()); |
1973 | 1973 |
1974 // The minimum y-coordinate at which one should consider place the arrow. | 1974 // The minimum y-coordinate at which one should consider place the arrow. |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2190 keyEquivalent:@""]; | 2190 keyEquivalent:@""]; |
2191 [menuItem setState:NSOffState]; | 2191 [menuItem setState:NSOffState]; |
2192 [menuItem setTarget:self]; | 2192 [menuItem setTarget:self]; |
2193 } | 2193 } |
2194 | 2194 |
2195 - (void)createNewProfile:(id)sender { | 2195 - (void)createNewProfile:(id)sender { |
2196 ProfileManager::CreateMultiProfileAsync(); | 2196 ProfileManager::CreateMultiProfileAsync(); |
2197 } | 2197 } |
2198 | 2198 |
2199 @end | 2199 @end |
OLD | NEW |