OLD | NEW |
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/location_bar/location_icon_decoration.h" | 5 #import "chrome/browser/ui/cocoa/location_bar/location_icon_decoration.h" |
6 | 6 |
7 #include "base/sys_string_conversions.h" | 7 #include "base/sys_string_conversions.h" |
8 #import "chrome/browser/bookmarks/bookmark_pasteboard_helper_mac.h" | 8 #import "chrome/browser/bookmarks/bookmark_pasteboard_helper_mac.h" |
9 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
10 #include "chrome/browser/ui/browser_commands.h" | 10 #include "chrome/browser/ui/browser_commands.h" |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 if (owner_->GetLocationEntry()->IsEditingOrEmpty()) | 97 if (owner_->GetLocationEntry()->IsEditingOrEmpty()) |
98 return true; | 98 return true; |
99 | 99 |
100 WebContents* tab = owner_->GetWebContents(); | 100 WebContents* tab = owner_->GetWebContents(); |
101 const NavigationController& controller = tab->GetController(); | 101 const NavigationController& controller = tab->GetController(); |
102 NavigationEntry* nav_entry = controller.GetActiveEntry(); | 102 NavigationEntry* nav_entry = controller.GetActiveEntry(); |
103 if (!nav_entry) { | 103 if (!nav_entry) { |
104 NOTREACHED(); | 104 NOTREACHED(); |
105 return true; | 105 return true; |
106 } | 106 } |
107 Browser* browser = browser::FindBrowserWithWebContents(tab); | 107 Browser* browser = chrome::FindBrowserWithWebContents(tab); |
108 chrome::ShowPageInfo(browser, tab, nav_entry->GetURL(), nav_entry->GetSSL(), | 108 chrome::ShowPageInfo(browser, tab, nav_entry->GetURL(), nav_entry->GetSSL(), |
109 true); | 109 true); |
110 return true; | 110 return true; |
111 } | 111 } |
112 | 112 |
113 NSString* LocationIconDecoration::GetToolTip() { | 113 NSString* LocationIconDecoration::GetToolTip() { |
114 if (owner_->GetLocationEntry()->IsEditingOrEmpty()) | 114 if (owner_->GetLocationEntry()->IsEditingOrEmpty()) |
115 return nil; | 115 return nil; |
116 else | 116 else |
117 return l10n_util::GetNSStringWithFixup(IDS_TOOLTIP_LOCATION_ICON); | 117 return l10n_util::GetNSStringWithFixup(IDS_TOOLTIP_LOCATION_ICON); |
118 } | 118 } |
OLD | NEW |