OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/autocomplete/keyword_provider.h" | 5 #include "chrome/browser/autocomplete/keyword_provider.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
11 #include "base/string16.h" | 11 #include "base/string16.h" |
12 #include "base/utf_string_conversions.h" | 12 #include "base/utf_string_conversions.h" |
13 #include "chrome/browser/autocomplete/autocomplete_match.h" | 13 #include "chrome/browser/autocomplete/autocomplete_match.h" |
14 #include "chrome/browser/extensions/extension_omnibox_api.h" | 14 #include "chrome/browser/extensions/extension_omnibox_api.h" |
15 #include "chrome/browser/extensions/extensions_service.h" | 15 #include "chrome/browser/extensions/extensions_service.h" |
16 #include "chrome/browser/profile.h" | 16 #include "chrome/browser/profiles/profile.h" |
17 #include "chrome/browser/search_engines/template_url.h" | 17 #include "chrome/browser/search_engines/template_url.h" |
18 #include "chrome/browser/search_engines/template_url_model.h" | 18 #include "chrome/browser/search_engines/template_url_model.h" |
19 #include "chrome/common/notification_service.h" | 19 #include "chrome/common/notification_service.h" |
20 #include "grit/generated_resources.h" | 20 #include "grit/generated_resources.h" |
21 #include "net/base/escape.h" | 21 #include "net/base/escape.h" |
22 #include "net/base/net_util.h" | 22 #include "net/base/net_util.h" |
23 | 23 |
24 // Helper functor for Start(), for ending keyword mode unless explicitly told | 24 // Helper functor for Start(), for ending keyword mode unless explicitly told |
25 // otherwise. | 25 // otherwise. |
26 class KeywordProvider::ScopedEndExtensionKeywordMode { | 26 class KeywordProvider::ScopedEndExtensionKeywordMode { |
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
495 } | 495 } |
496 | 496 |
497 void KeywordProvider::MaybeEndExtensionKeywordMode() { | 497 void KeywordProvider::MaybeEndExtensionKeywordMode() { |
498 if (!current_keyword_extension_id_.empty()) { | 498 if (!current_keyword_extension_id_.empty()) { |
499 ExtensionOmniboxEventRouter::OnInputCancelled( | 499 ExtensionOmniboxEventRouter::OnInputCancelled( |
500 profile_, current_keyword_extension_id_); | 500 profile_, current_keyword_extension_id_); |
501 | 501 |
502 current_keyword_extension_id_.clear(); | 502 current_keyword_extension_id_.clear(); |
503 } | 503 } |
504 } | 504 } |
OLD | NEW |