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

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

Issue 6995032: Fix a browser crash involving omnibox extension keywords. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: latest Created 9 years, 7 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) 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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/render_view_context_menu.cc ('k') | chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698