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

Side by Side Diff: chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm

Issue 273193004: Move some content url constants to /url. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing files. Created 6 years, 6 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
« no previous file with comments | « chrome/browser/ui/cocoa/drag_util.mm ('k') | chrome/browser/ui/omnibox/omnibox_view.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/toolbar/toolbar_controller.h" 5 #import "chrome/browser/ui/cocoa/toolbar/toolbar_controller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/mac/bundle_locations.h" 9 #include "base/mac/bundle_locations.h"
10 #include "base/mac/mac_util.h" 10 #include "base/mac/mac_util.h"
(...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after
811 } 811 }
812 812
813 // TODO(viettrungluu): dropping multiple URLs? 813 // TODO(viettrungluu): dropping multiple URLs?
814 if ([urls count] > 1) 814 if ([urls count] > 1)
815 NOTIMPLEMENTED(); 815 NOTIMPLEMENTED();
816 816
817 // Get the first URL and fix it up. 817 // Get the first URL and fix it up.
818 GURL url(URLFixerUpper::FixupURL( 818 GURL url(URLFixerUpper::FixupURL(
819 base::SysNSStringToUTF8([urls objectAtIndex:0]), std::string())); 819 base::SysNSStringToUTF8([urls objectAtIndex:0]), std::string()));
820 820
821 if (url.SchemeIs(content::kJavaScriptScheme)) { 821 if (url.SchemeIs(url::kJavaScriptScheme)) {
822 browser_->window()->GetLocationBar()->GetOmniboxView()->SetUserText( 822 browser_->window()->GetLocationBar()->GetOmniboxView()->SetUserText(
823 OmniboxView::StripJavascriptSchemas(base::UTF8ToUTF16(url.spec()))); 823 OmniboxView::StripJavascriptSchemas(base::UTF8ToUTF16(url.spec())));
824 } 824 }
825 OpenURLParams params( 825 OpenURLParams params(
826 url, Referrer(), CURRENT_TAB, content::PAGE_TRANSITION_TYPED, false); 826 url, Referrer(), CURRENT_TAB, content::PAGE_TRANSITION_TYPED, false);
827 browser_->tab_strip_model()->GetActiveWebContents()->OpenURL(params); 827 browser_->tab_strip_model()->GetActiveWebContents()->OpenURL(params);
828 } 828 }
829 829
830 // (URLDropTargetController protocol) 830 // (URLDropTargetController protocol)
831 - (void)dropText:(NSString*)text inView:(NSView*)view at:(NSPoint)point { 831 - (void)dropText:(NSString*)text inView:(NSView*)view at:(NSPoint)point {
(...skipping 22 matching lines...) Expand all
854 - (void)hideDropURLsIndicatorInView:(NSView*)view { 854 - (void)hideDropURLsIndicatorInView:(NSView*)view {
855 // Do nothing. 855 // Do nothing.
856 } 856 }
857 857
858 // (URLDropTargetController protocol) 858 // (URLDropTargetController protocol)
859 - (BOOL)isUnsupportedDropData:(id<NSDraggingInfo>)info { 859 - (BOOL)isUnsupportedDropData:(id<NSDraggingInfo>)info {
860 return drag_util::IsUnsupportedDropData(profile_, info); 860 return drag_util::IsUnsupportedDropData(profile_, info);
861 } 861 }
862 862
863 @end 863 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/drag_util.mm ('k') | chrome/browser/ui/omnibox/omnibox_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698