| 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 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" | 5 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
| (...skipping 858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 869 } | 869 } |
| 870 | 870 |
| 871 void LocationBarView::ShowFirstRunBubbleInternal() { | 871 void LocationBarView::ShowFirstRunBubbleInternal() { |
| 872 // First run bubble doesn't make sense for Chrome OS. | 872 // First run bubble doesn't make sense for Chrome OS. |
| 873 #if !defined(OS_CHROMEOS) | 873 #if !defined(OS_CHROMEOS) |
| 874 WebContents* web_contents = delegate_->GetWebContents(); | 874 WebContents* web_contents = delegate_->GetWebContents(); |
| 875 if (!web_contents) | 875 if (!web_contents) |
| 876 return; | 876 return; |
| 877 Browser* browser = chrome::FindBrowserWithWebContents(web_contents); | 877 Browser* browser = chrome::FindBrowserWithWebContents(web_contents); |
| 878 if (browser) | 878 if (browser) |
| 879 FirstRunBubble::ShowBubble(browser, GetSecurityBubbleAnchorView()); | 879 FirstRunBubble::ShowBubble(browser, location_icon_view_->GetImageView()); |
| 880 #endif | 880 #endif |
| 881 } | 881 } |
| 882 | 882 |
| 883 base::string16 LocationBarView::GetLocationIconText() const { | 883 base::string16 LocationBarView::GetLocationIconText() const { |
| 884 if (GetToolbarModel()->GetURL().SchemeIs(content::kChromeUIScheme)) | 884 if (GetToolbarModel()->GetURL().SchemeIs(content::kChromeUIScheme)) |
| 885 return l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME); | 885 return l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME); |
| 886 | 886 |
| 887 const base::string16 extension_name = GetExtensionName( | 887 const base::string16 extension_name = GetExtensionName( |
| 888 GetToolbarModel()->GetURL(), delegate_->GetWebContents()); | 888 GetToolbarModel()->GetURL(), delegate_->GetWebContents()); |
| 889 if (!extension_name.empty()) | 889 if (!extension_name.empty()) |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1230 // LocationBarView, private TemplateURLServiceObserver implementation: | 1230 // LocationBarView, private TemplateURLServiceObserver implementation: |
| 1231 | 1231 |
| 1232 void LocationBarView::OnTemplateURLServiceChanged() { | 1232 void LocationBarView::OnTemplateURLServiceChanged() { |
| 1233 template_url_service_->RemoveObserver(this); | 1233 template_url_service_->RemoveObserver(this); |
| 1234 template_url_service_ = nullptr; | 1234 template_url_service_ = nullptr; |
| 1235 // If the browser is no longer active, let's not show the info bubble, as this | 1235 // If the browser is no longer active, let's not show the info bubble, as this |
| 1236 // would make the browser the active window again. | 1236 // would make the browser the active window again. |
| 1237 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive()) | 1237 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive()) |
| 1238 ShowFirstRunBubble(); | 1238 ShowFirstRunBubble(); |
| 1239 } | 1239 } |
| OLD | NEW |