Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1257)

Unified Diff: chrome/browser/autocomplete/keyword_provider.cc

Issue 10265022: Moving extensions inside chrome/browser/extensions/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/autocomplete/keyword_provider.cc
diff --git a/chrome/browser/autocomplete/keyword_provider.cc b/chrome/browser/autocomplete/keyword_provider.cc
index 1a186a7d9c18f92247e6e534de7d5e6bff034222..795fc62e300fe494248babc6157e9181cb43c417 100644
--- a/chrome/browser/autocomplete/keyword_provider.cc
+++ b/chrome/browser/autocomplete/keyword_provider.cc
@@ -10,7 +10,7 @@
#include "base/string16.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/autocomplete/autocomplete_match.h"
-#include "chrome/browser/extensions/extension_omnibox_api.h"
+#include "chrome/browser/extensions/api/omnibox/omnibox_api.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search_engines/template_url.h"
@@ -294,9 +294,10 @@ void KeywordProvider::Start(const AutocompleteInput& input,
keyword_mode_toggle.StayInKeywordMode();
}
- ApplyDefaultSuggestionForExtensionKeyword(profile_, template_url,
- remaining_input,
- &matches_[0]);
+ extensions::ApplyDefaultSuggestionForExtensionKeyword(
+ profile_, template_url,
Matt Perry 2012/05/01 01:23:21 wrapped lines should have a 4-space indent: http:/
vabr (Chromium) 2012/05/01 02:06:50 Done.
+ remaining_input,
+ &matches_[0]);
if (minimal_changes &&
(input.matches_requested() != AutocompleteInput::BEST_MATCH)) {
@@ -311,9 +312,10 @@ void KeywordProvider::Start(const AutocompleteInput& input,
extension_suggest_last_input_ = input;
extension_suggest_matches_.clear();
- bool have_listeners = ExtensionOmniboxEventRouter::OnInputChanged(
- profile_, template_url->GetExtensionId(),
- UTF16ToUTF8(remaining_input), current_input_id_);
+ bool have_listeners =
+ extensions::ExtensionOmniboxEventRouter::OnInputChanged(
+ profile_, template_url->GetExtensionId(),
+ UTF16ToUTF8(remaining_input), current_input_id_);
// We only have to wait for suggest results if there are actually
// extensions listening for input changes.
@@ -504,16 +506,18 @@ void KeywordProvider::Observe(int type,
const TemplateURL* template_url(
model->GetTemplateURLForKeyword(keyword));
- ApplyDefaultSuggestionForExtensionKeyword(profile_, template_url,
- remaining_input,
- &matches_[0]);
+ extensions::ApplyDefaultSuggestionForExtensionKeyword(
+ profile_, template_url,
+ remaining_input,
+ &matches_[0]);
listener_->OnProviderUpdate(true);
return;
}
case chrome::NOTIFICATION_EXTENSION_OMNIBOX_SUGGESTIONS_READY: {
- const ExtensionOmniboxSuggestions& suggestions =
- *content::Details<ExtensionOmniboxSuggestions>(details).ptr();
+ const extensions::ExtensionOmniboxSuggestions& suggestions =
+ *content::Details<
+ extensions::ExtensionOmniboxSuggestions>(details).ptr();
if (suggestions.request_id != current_input_id_)
return; // This is an old result. Just ignore.
@@ -526,7 +530,7 @@ void KeywordProvider::Observe(int type,
// TODO(mpcomplete): consider clamping the number of suggestions to
// AutocompleteProvider::kMaxMatches.
for (size_t i = 0; i < suggestions.suggestions.size(); ++i) {
- const ExtensionOmniboxSuggestion& suggestion =
+ const extensions::ExtensionOmniboxSuggestion& suggestion =
suggestions.suggestions[i];
// We want to order these suggestions in descending order, so start with
// the relevance of the first result (added synchronously in Start()),
@@ -574,13 +578,13 @@ void KeywordProvider::EnterExtensionKeywordMode(
DCHECK(current_keyword_extension_id_.empty());
current_keyword_extension_id_ = extension_id;
- ExtensionOmniboxEventRouter::OnInputStarted(
+ extensions::ExtensionOmniboxEventRouter::OnInputStarted(
profile_, current_keyword_extension_id_);
}
void KeywordProvider::MaybeEndExtensionKeywordMode() {
if (!current_keyword_extension_id_.empty()) {
- ExtensionOmniboxEventRouter::OnInputCancelled(
+ extensions::ExtensionOmniboxEventRouter::OnInputCancelled(
profile_, current_keyword_extension_id_);
current_keyword_extension_id_.clear();

Powered by Google App Engine
This is Rietveld 408576698