| 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" | 
| 11 #include "base/prefs/pref_service.h" |  | 
| 12 #include "base/stl_util.h" | 11 #include "base/stl_util.h" | 
| 13 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" | 
| 14 #include "build/build_config.h" | 13 #include "build/build_config.h" | 
| 15 #include "chrome/app/chrome_command_ids.h" | 14 #include "chrome/app/chrome_command_ids.h" | 
| 16 #include "chrome/browser/command_updater.h" | 15 #include "chrome/browser/command_updater.h" | 
| 17 #include "chrome/browser/defaults.h" | 16 #include "chrome/browser/defaults.h" | 
| 18 #include "chrome/browser/extensions/api/omnibox/omnibox_api.h" | 17 #include "chrome/browser/extensions/api/omnibox/omnibox_api.h" | 
| 19 #include "chrome/browser/extensions/extension_action.h" | 18 #include "chrome/browser/extensions/extension_action.h" | 
| 20 #include "chrome/browser/extensions/extension_action_manager.h" | 19 #include "chrome/browser/extensions/extension_action_manager.h" | 
| 21 #include "chrome/browser/extensions/extension_util.h" | 20 #include "chrome/browser/extensions/extension_util.h" | 
| (...skipping 27 matching lines...) Expand all  Loading... | 
| 49 #include "chrome/browser/ui/views/location_bar/zoom_view.h" | 48 #include "chrome/browser/ui/views/location_bar/zoom_view.h" | 
| 50 #include "chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h" | 49 #include "chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h" | 
| 51 #include "chrome/browser/ui/views/passwords/manage_passwords_icon_views.h" | 50 #include "chrome/browser/ui/views/passwords/manage_passwords_icon_views.h" | 
| 52 #include "chrome/browser/ui/views/translate/translate_bubble_view.h" | 51 #include "chrome/browser/ui/views/translate/translate_bubble_view.h" | 
| 53 #include "chrome/browser/ui/views/translate/translate_icon_view.h" | 52 #include "chrome/browser/ui/views/translate/translate_icon_view.h" | 
| 54 #include "chrome/grit/generated_resources.h" | 53 #include "chrome/grit/generated_resources.h" | 
| 55 #include "components/bookmarks/common/bookmark_pref_names.h" | 54 #include "components/bookmarks/common/bookmark_pref_names.h" | 
| 56 #include "components/favicon/content/content_favicon_driver.h" | 55 #include "components/favicon/content/content_favicon_driver.h" | 
| 57 #include "components/omnibox/browser/omnibox_popup_model.h" | 56 #include "components/omnibox/browser/omnibox_popup_model.h" | 
| 58 #include "components/omnibox/browser/omnibox_popup_view.h" | 57 #include "components/omnibox/browser/omnibox_popup_view.h" | 
|  | 58 #include "components/prefs/pref_service.h" | 
| 59 #include "components/search_engines/template_url.h" | 59 #include "components/search_engines/template_url.h" | 
| 60 #include "components/search_engines/template_url_service.h" | 60 #include "components/search_engines/template_url_service.h" | 
| 61 #include "components/toolbar/toolbar_model.h" | 61 #include "components/toolbar/toolbar_model.h" | 
| 62 #include "components/translate/core/browser/language_state.h" | 62 #include "components/translate/core/browser/language_state.h" | 
| 63 #include "components/ui/zoom/zoom_controller.h" | 63 #include "components/ui/zoom/zoom_controller.h" | 
| 64 #include "components/ui/zoom/zoom_event_manager.h" | 64 #include "components/ui/zoom/zoom_event_manager.h" | 
| 65 #include "content/public/browser/render_widget_host_view.h" | 65 #include "content/public/browser/render_widget_host_view.h" | 
| 66 #include "content/public/browser/web_contents.h" | 66 #include "content/public/browser/web_contents.h" | 
| 67 #include "extensions/browser/extension_registry.h" | 67 #include "extensions/browser/extension_registry.h" | 
| 68 #include "extensions/common/feature_switch.h" | 68 #include "extensions/common/feature_switch.h" | 
| (...skipping 1308 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1377 // LocationBarView, private TemplateURLServiceObserver implementation: | 1377 // LocationBarView, private TemplateURLServiceObserver implementation: | 
| 1378 | 1378 | 
| 1379 void LocationBarView::OnTemplateURLServiceChanged() { | 1379 void LocationBarView::OnTemplateURLServiceChanged() { | 
| 1380   template_url_service_->RemoveObserver(this); | 1380   template_url_service_->RemoveObserver(this); | 
| 1381   template_url_service_ = nullptr; | 1381   template_url_service_ = nullptr; | 
| 1382   // If the browser is no longer active, let's not show the info bubble, as this | 1382   // If the browser is no longer active, let's not show the info bubble, as this | 
| 1383   // would make the browser the active window again. | 1383   // would make the browser the active window again. | 
| 1384   if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive()) | 1384   if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive()) | 
| 1385     ShowFirstRunBubble(); | 1385     ShowFirstRunBubble(); | 
| 1386 } | 1386 } | 
| OLD | NEW | 
|---|