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" | 11 #include "base/prefs/pref_service.h" |
12 #include "base/stl_util.h" | 12 #include "base/stl_util.h" |
13 #include "base/strings/utf_string_conversions.h" | 13 #include "base/strings/utf_string_conversions.h" |
| 14 #include "build/build_config.h" |
14 #include "chrome/app/chrome_command_ids.h" | 15 #include "chrome/app/chrome_command_ids.h" |
15 #include "chrome/browser/command_updater.h" | 16 #include "chrome/browser/command_updater.h" |
16 #include "chrome/browser/defaults.h" | 17 #include "chrome/browser/defaults.h" |
17 #include "chrome/browser/extensions/api/omnibox/omnibox_api.h" | 18 #include "chrome/browser/extensions/api/omnibox/omnibox_api.h" |
18 #include "chrome/browser/extensions/extension_action.h" | 19 #include "chrome/browser/extensions/extension_action.h" |
19 #include "chrome/browser/extensions/extension_action_manager.h" | 20 #include "chrome/browser/extensions/extension_action_manager.h" |
20 #include "chrome/browser/extensions/extension_util.h" | 21 #include "chrome/browser/extensions/extension_util.h" |
21 #include "chrome/browser/extensions/location_bar_controller.h" | 22 #include "chrome/browser/extensions/location_bar_controller.h" |
22 #include "chrome/browser/extensions/tab_helper.h" | 23 #include "chrome/browser/extensions/tab_helper.h" |
23 #include "chrome/browser/profiles/profile.h" | 24 #include "chrome/browser/profiles/profile.h" |
(...skipping 1356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1380 // LocationBarView, private TemplateURLServiceObserver implementation: | 1381 // LocationBarView, private TemplateURLServiceObserver implementation: |
1381 | 1382 |
1382 void LocationBarView::OnTemplateURLServiceChanged() { | 1383 void LocationBarView::OnTemplateURLServiceChanged() { |
1383 template_url_service_->RemoveObserver(this); | 1384 template_url_service_->RemoveObserver(this); |
1384 template_url_service_ = nullptr; | 1385 template_url_service_ = nullptr; |
1385 // If the browser is no longer active, let's not show the info bubble, as this | 1386 // If the browser is no longer active, let's not show the info bubble, as this |
1386 // would make the browser the active window again. | 1387 // would make the browser the active window again. |
1387 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive()) | 1388 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive()) |
1388 ShowFirstRunBubble(); | 1389 ShowFirstRunBubble(); |
1389 } | 1390 } |
OLD | NEW |