| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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/omnibox/omnibox_edit_model.h" | 5 #include "chrome/browser/ui/omnibox/omnibox_edit_model.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 #include "chrome/browser/google/google_url_tracker_factory.h" | 31 #include "chrome/browser/google/google_url_tracker_factory.h" |
| 32 #include "chrome/browser/net/predictor.h" | 32 #include "chrome/browser/net/predictor.h" |
| 33 #include "chrome/browser/omnibox/omnibox_log.h" | 33 #include "chrome/browser/omnibox/omnibox_log.h" |
| 34 #include "chrome/browser/predictors/autocomplete_action_predictor.h" | 34 #include "chrome/browser/predictors/autocomplete_action_predictor.h" |
| 35 #include "chrome/browser/predictors/autocomplete_action_predictor_factory.h" | 35 #include "chrome/browser/predictors/autocomplete_action_predictor_factory.h" |
| 36 #include "chrome/browser/prerender/prerender_field_trial.h" | 36 #include "chrome/browser/prerender/prerender_field_trial.h" |
| 37 #include "chrome/browser/prerender/prerender_manager.h" | 37 #include "chrome/browser/prerender/prerender_manager.h" |
| 38 #include "chrome/browser/prerender/prerender_manager_factory.h" | 38 #include "chrome/browser/prerender/prerender_manager_factory.h" |
| 39 #include "chrome/browser/profiles/profile.h" | 39 #include "chrome/browser/profiles/profile.h" |
| 40 #include "chrome/browser/search/search.h" | 40 #include "chrome/browser/search/search.h" |
| 41 #include "chrome/browser/search_engines/template_url_service.h" | |
| 42 #include "chrome/browser/search_engines/template_url_service_factory.h" | 41 #include "chrome/browser/search_engines/template_url_service_factory.h" |
| 43 #include "chrome/browser/search_engines/ui_thread_search_terms_data.h" | 42 #include "chrome/browser/search_engines/ui_thread_search_terms_data.h" |
| 44 #include "chrome/browser/sessions/session_tab_helper.h" | 43 #include "chrome/browser/sessions/session_tab_helper.h" |
| 45 #include "chrome/browser/ui/browser_list.h" | 44 #include "chrome/browser/ui/browser_list.h" |
| 46 #include "chrome/browser/ui/omnibox/omnibox_current_page_delegate_impl.h" | 45 #include "chrome/browser/ui/omnibox/omnibox_current_page_delegate_impl.h" |
| 47 #include "chrome/browser/ui/omnibox/omnibox_edit_controller.h" | 46 #include "chrome/browser/ui/omnibox/omnibox_edit_controller.h" |
| 48 #include "chrome/browser/ui/omnibox/omnibox_navigation_observer.h" | 47 #include "chrome/browser/ui/omnibox/omnibox_navigation_observer.h" |
| 49 #include "chrome/browser/ui/omnibox/omnibox_popup_model.h" | 48 #include "chrome/browser/ui/omnibox/omnibox_popup_model.h" |
| 50 #include "chrome/browser/ui/omnibox/omnibox_popup_view.h" | 49 #include "chrome/browser/ui/omnibox/omnibox_popup_view.h" |
| 51 #include "chrome/browser/ui/omnibox/omnibox_view.h" | 50 #include "chrome/browser/ui/omnibox/omnibox_view.h" |
| 52 #include "chrome/browser/ui/search/instant_search_prerenderer.h" | 51 #include "chrome/browser/ui/search/instant_search_prerenderer.h" |
| 53 #include "chrome/browser/ui/search/search_tab_helper.h" | 52 #include "chrome/browser/ui/search/search_tab_helper.h" |
| 54 #include "chrome/browser/ui/toolbar/toolbar_model.h" | 53 #include "chrome/browser/ui/toolbar/toolbar_model.h" |
| 55 #include "chrome/common/chrome_switches.h" | 54 #include "chrome/common/chrome_switches.h" |
| 56 #include "chrome/common/pref_names.h" | 55 #include "chrome/common/pref_names.h" |
| 57 #include "chrome/common/url_constants.h" | 56 #include "chrome/common/url_constants.h" |
| 58 #include "components/google/core/browser/google_url_tracker.h" | 57 #include "components/google/core/browser/google_url_tracker.h" |
| 59 #include "components/metrics/proto/omnibox_event.pb.h" | 58 #include "components/metrics/proto/omnibox_event.pb.h" |
| 60 #include "components/search_engines/template_url.h" | 59 #include "components/search_engines/template_url.h" |
| 61 #include "components/search_engines/template_url_prepopulate_data.h" | 60 #include "components/search_engines/template_url_prepopulate_data.h" |
| 61 #include "components/search_engines/template_url_service.h" |
| 62 #include "components/url_fixer/url_fixer.h" | 62 #include "components/url_fixer/url_fixer.h" |
| 63 #include "content/public/browser/navigation_controller.h" | 63 #include "content/public/browser/navigation_controller.h" |
| 64 #include "content/public/browser/navigation_entry.h" | 64 #include "content/public/browser/navigation_entry.h" |
| 65 #include "content/public/browser/notification_service.h" | 65 #include "content/public/browser/notification_service.h" |
| 66 #include "content/public/browser/render_view_host.h" | 66 #include "content/public/browser/render_view_host.h" |
| 67 #include "content/public/browser/user_metrics.h" | 67 #include "content/public/browser/user_metrics.h" |
| 68 #include "extensions/common/constants.h" | 68 #include "extensions/common/constants.h" |
| 69 #include "ui/gfx/image/image.h" | 69 #include "ui/gfx/image/image.h" |
| 70 #include "url/url_util.h" | 70 #include "url/url_util.h" |
| 71 | 71 |
| (...skipping 1400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1472 // Update state and notify view if the omnibox has focus and the caret | 1472 // Update state and notify view if the omnibox has focus and the caret |
| 1473 // visibility changed. | 1473 // visibility changed. |
| 1474 const bool was_caret_visible = is_caret_visible(); | 1474 const bool was_caret_visible = is_caret_visible(); |
| 1475 focus_state_ = state; | 1475 focus_state_ = state; |
| 1476 if (focus_state_ != OMNIBOX_FOCUS_NONE && | 1476 if (focus_state_ != OMNIBOX_FOCUS_NONE && |
| 1477 is_caret_visible() != was_caret_visible) | 1477 is_caret_visible() != was_caret_visible) |
| 1478 view_->ApplyCaretVisibility(); | 1478 view_->ApplyCaretVisibility(); |
| 1479 | 1479 |
| 1480 delegate_->OnFocusChanged(focus_state_, reason); | 1480 delegate_->OnFocusChanged(focus_state_, reason); |
| 1481 } | 1481 } |
| OLD | NEW |