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

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

Issue 1171333003: Move net::FormatUrl and friends outside of //net and into //components (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase again now that CQ is fixed Created 5 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
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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 #include "chrome/browser/ui/find_bar/find_tab_helper.h" 44 #include "chrome/browser/ui/find_bar/find_tab_helper.h"
45 #include "chrome/browser/ui/tabs/tab_menu_model.h" 45 #include "chrome/browser/ui/tabs/tab_menu_model.h"
46 #include "chrome/browser/ui/tabs/tab_strip_model.h" 46 #include "chrome/browser/ui/tabs/tab_strip_model.h"
47 #include "chrome/browser/ui/tabs/tab_strip_model_delegate.h" 47 #include "chrome/browser/ui/tabs/tab_strip_model_delegate.h"
48 #include "chrome/browser/ui/tabs/tab_utils.h" 48 #include "chrome/browser/ui/tabs/tab_utils.h"
49 #include "chrome/common/chrome_switches.h" 49 #include "chrome/common/chrome_switches.h"
50 #include "chrome/grit/generated_resources.h" 50 #include "chrome/grit/generated_resources.h"
51 #include "components/metrics/proto/omnibox_event.pb.h" 51 #include "components/metrics/proto/omnibox_event.pb.h"
52 #include "components/omnibox/browser/autocomplete_classifier.h" 52 #include "components/omnibox/browser/autocomplete_classifier.h"
53 #include "components/omnibox/browser/autocomplete_match.h" 53 #include "components/omnibox/browser/autocomplete_match.h"
54 #include "components/url_fixer/url_fixer.h" 54 #include "components/url_formatter/url_fixer.h"
55 #include "components/web_modal/web_contents_modal_dialog_manager.h" 55 #include "components/web_modal/web_contents_modal_dialog_manager.h"
56 #include "content/public/browser/navigation_controller.h" 56 #include "content/public/browser/navigation_controller.h"
57 #include "content/public/browser/user_metrics.h" 57 #include "content/public/browser/user_metrics.h"
58 #include "content/public/browser/web_contents.h" 58 #include "content/public/browser/web_contents.h"
59 #include "grit/theme_resources.h" 59 #include "grit/theme_resources.h"
60 #include "skia/ext/skia_utils_mac.h" 60 #include "skia/ext/skia_utils_mac.h"
61 #import "third_party/google_toolbox_for_mac/src/AppKit/GTMNSAnimation+Duration.h " 61 #import "third_party/google_toolbox_for_mac/src/AppKit/GTMNSAnimation+Duration.h "
62 #include "ui/base/cocoa/animation_utils.h" 62 #include "ui/base/cocoa/animation_utils.h"
63 #import "ui/base/cocoa/tracking_area.h" 63 #import "ui/base/cocoa/tracking_area.h"
64 #include "ui/base/l10n/l10n_util.h" 64 #include "ui/base/l10n/l10n_util.h"
(...skipping 2021 matching lines...) Expand 10 before | Expand all | Expand 10 after
2086 if ([urls count] < 1) { 2086 if ([urls count] < 1) {
2087 NOTREACHED(); 2087 NOTREACHED();
2088 return; 2088 return;
2089 } 2089 }
2090 2090
2091 //TODO(viettrungluu): dropping multiple URLs. 2091 //TODO(viettrungluu): dropping multiple URLs.
2092 if ([urls count] > 1) 2092 if ([urls count] > 1)
2093 NOTIMPLEMENTED(); 2093 NOTIMPLEMENTED();
2094 2094
2095 // Get the first URL and fix it up. 2095 // Get the first URL and fix it up.
2096 GURL url(GURL(url_fixer::FixupURL( 2096 GURL url(GURL(url_formatter::FixupURL(
2097 base::SysNSStringToUTF8([urls objectAtIndex:0]), std::string()))); 2097 base::SysNSStringToUTF8([urls objectAtIndex:0]), std::string())));
2098 2098
2099 [self openURL:&url inView:view at:point]; 2099 [self openURL:&url inView:view at:point];
2100 } 2100 }
2101 2101
2102 // (URLDropTargetController protocol) 2102 // (URLDropTargetController protocol)
2103 - (void)dropText:(NSString*)text inView:(NSView*)view at:(NSPoint)point { 2103 - (void)dropText:(NSString*)text inView:(NSView*)view at:(NSPoint)point {
2104 DCHECK_EQ(view, tabStripView_.get()); 2104 DCHECK_EQ(view, tabStripView_.get());
2105 2105
2106 // If the input is plain text, classify the input and make the URL. 2106 // If the input is plain text, classify the input and make the URL.
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
2283 forButtonState:image_button_cell::kHoverStateBackground]; 2283 forButtonState:image_button_cell::kHoverStateBackground];
2284 } else { 2284 } else {
2285 [[newTabButton_ cell] setImage:nil 2285 [[newTabButton_ cell] setImage:nil
2286 forButtonState:image_button_cell::kDefaultStateBackground]; 2286 forButtonState:image_button_cell::kDefaultStateBackground];
2287 [[newTabButton_ cell] setImage:nil 2287 [[newTabButton_ cell] setImage:nil
2288 forButtonState:image_button_cell::kHoverStateBackground]; 2288 forButtonState:image_button_cell::kHoverStateBackground];
2289 } 2289 }
2290 } 2290 }
2291 2291
2292 @end 2292 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/status_bubble_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