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

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

Issue 23283007: Move kJavaScriptScheme into content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: content:: is necessary in web_drag_source_mac.mm Created 7 years, 4 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
« no previous file with comments | « chrome/browser/history/history_service.cc ('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 763 matching lines...) Expand 10 before | Expand all | Expand 10 after
774 } 774 }
775 775
776 // TODO(viettrungluu): dropping multiple URLs? 776 // TODO(viettrungluu): dropping multiple URLs?
777 if ([urls count] > 1) 777 if ([urls count] > 1)
778 NOTIMPLEMENTED(); 778 NOTIMPLEMENTED();
779 779
780 // Get the first URL and fix it up. 780 // Get the first URL and fix it up.
781 GURL url(URLFixerUpper::FixupURL( 781 GURL url(URLFixerUpper::FixupURL(
782 base::SysNSStringToUTF8([urls objectAtIndex:0]), std::string())); 782 base::SysNSStringToUTF8([urls objectAtIndex:0]), std::string()));
783 783
784 if (url.SchemeIs(chrome::kJavaScriptScheme)) { 784 if (url.SchemeIs(content::kJavaScriptScheme)) {
785 browser_->window()->GetLocationBar()->GetLocationEntry()->SetUserText( 785 browser_->window()->GetLocationBar()->GetLocationEntry()->SetUserText(
786 OmniboxView::StripJavascriptSchemas(UTF8ToUTF16(url.spec()))); 786 OmniboxView::StripJavascriptSchemas(UTF8ToUTF16(url.spec())));
787 } 787 }
788 OpenURLParams params( 788 OpenURLParams params(
789 url, Referrer(), CURRENT_TAB, content::PAGE_TRANSITION_TYPED, false); 789 url, Referrer(), CURRENT_TAB, content::PAGE_TRANSITION_TYPED, false);
790 browser_->tab_strip_model()->GetActiveWebContents()->OpenURL(params); 790 browser_->tab_strip_model()->GetActiveWebContents()->OpenURL(params);
791 } 791 }
792 792
793 // (URLDropTargetController protocol) 793 // (URLDropTargetController protocol)
794 - (void)dropText:(NSString*)text inView:(NSView*)view at:(NSPoint)point { 794 - (void)dropText:(NSString*)text inView:(NSView*)view at:(NSPoint)point {
(...skipping 21 matching lines...) Expand all
816 - (void)hideDropURLsIndicatorInView:(NSView*)view { 816 - (void)hideDropURLsIndicatorInView:(NSView*)view {
817 // Do nothing. 817 // Do nothing.
818 } 818 }
819 819
820 // (URLDropTargetController protocol) 820 // (URLDropTargetController protocol)
821 - (BOOL)isUnsupportedDropData:(id<NSDraggingInfo>)info { 821 - (BOOL)isUnsupportedDropData:(id<NSDraggingInfo>)info {
822 return drag_util::IsUnsupportedDropData(profile_, info); 822 return drag_util::IsUnsupportedDropData(profile_, info);
823 } 823 }
824 824
825 @end 825 @end
OLDNEW
« no previous file with comments | « chrome/browser/history/history_service.cc ('k') | chrome/browser/ui/omnibox/omnibox_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698