| 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/omnibox/omnibox_popup_model.h" | 5 #include "chrome/browser/ui/omnibox/omnibox_popup_model.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| 11 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 11 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
| 12 #include "chrome/browser/extensions/api/omnibox/omnibox_api.h" | 12 #include "chrome/browser/extensions/api/omnibox/omnibox_api.h" |
| 13 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
| 14 #include "chrome/browser/search_engines/template_url_service_factory.h" | 14 #include "chrome/browser/search_engines/template_url_service_factory.h" |
| 15 #include "chrome/browser/ui/omnibox/omnibox_popup_model_observer.h" | 15 #include "chrome/browser/ui/omnibox/omnibox_popup_model_observer.h" |
| 16 #include "chrome/browser/ui/omnibox/omnibox_popup_view.h" | 16 #include "chrome/browser/ui/omnibox/omnibox_popup_view.h" |
| 17 #include "components/bookmarks/browser/bookmark_model.h" | 17 #include "components/bookmarks/browser/bookmark_model.h" |
| 18 #include "components/omnibox/autocomplete_match.h" | 18 #include "components/omnibox/autocomplete_match.h" |
| 19 #include "components/search_engines/template_url.h" | 19 #include "components/search_engines/template_url.h" |
| 20 #include "components/search_engines/template_url_service.h" | 20 #include "components/search_engines/template_url_service.h" |
| 21 #include "third_party/icu/source/common/unicode/ubidi.h" | 21 #include "third_party/icu/source/common/unicode/ubidi.h" |
| 22 #include "ui/gfx/geometry/rect.h" |
| 22 #include "ui/gfx/image/image.h" | 23 #include "ui/gfx/image/image.h" |
| 23 #include "ui/gfx/rect.h" | |
| 24 | 24 |
| 25 /////////////////////////////////////////////////////////////////////////////// | 25 /////////////////////////////////////////////////////////////////////////////// |
| 26 // OmniboxPopupModel | 26 // OmniboxPopupModel |
| 27 | 27 |
| 28 const size_t OmniboxPopupModel::kNoMatch = static_cast<size_t>(-1); | 28 const size_t OmniboxPopupModel::kNoMatch = static_cast<size_t>(-1); |
| 29 | 29 |
| 30 OmniboxPopupModel::OmniboxPopupModel( | 30 OmniboxPopupModel::OmniboxPopupModel( |
| 31 OmniboxPopupView* popup_view, | 31 OmniboxPopupView* popup_view, |
| 32 OmniboxEditModel* edit_model) | 32 OmniboxEditModel* edit_model) |
| 33 : view_(popup_view), | 33 : view_(popup_view), |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 } | 286 } |
| 287 } | 287 } |
| 288 | 288 |
| 289 void OmniboxPopupModel::AddObserver(OmniboxPopupModelObserver* observer) { | 289 void OmniboxPopupModel::AddObserver(OmniboxPopupModelObserver* observer) { |
| 290 observers_.AddObserver(observer); | 290 observers_.AddObserver(observer); |
| 291 } | 291 } |
| 292 | 292 |
| 293 void OmniboxPopupModel::RemoveObserver(OmniboxPopupModelObserver* observer) { | 293 void OmniboxPopupModel::RemoveObserver(OmniboxPopupModelObserver* observer) { |
| 294 observers_.RemoveObserver(observer); | 294 observers_.RemoveObserver(observer); |
| 295 } | 295 } |
| OLD | NEW |