OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 // KeywordExtensionsDelegateImpl contains the extensions-only logic used by | 5 // KeywordExtensionsDelegateImpl contains the extensions-only logic used by |
6 // KeywordProvider. Overrides KeywordExtensionsDelegate which does nothing. | 6 // KeywordProvider. Overrides KeywordExtensionsDelegate which does nothing. |
7 | 7 |
8 #ifndef CHROME_BROWSER_AUTOCOMPLETE_KEYWORD_EXTENSIONS_DELEGATE_IMPL_H_ | 8 #ifndef CHROME_BROWSER_AUTOCOMPLETE_KEYWORD_EXTENSIONS_DELEGATE_IMPL_H_ |
9 #define CHROME_BROWSER_AUTOCOMPLETE_KEYWORD_EXTENSIONS_DELEGATE_IMPL_H_ | 9 #define CHROME_BROWSER_AUTOCOMPLETE_KEYWORD_EXTENSIONS_DELEGATE_IMPL_H_ |
10 | 10 |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
14 #include "chrome/browser/autocomplete/keyword_extensions_delegate.h" | 14 #include "chrome/browser/autocomplete/keyword_extensions_delegate.h" |
15 #include "chrome/browser/autocomplete/keyword_provider.h" | 15 #include "chrome/browser/autocomplete/keyword_provider.h" |
16 #include "components/autocomplete/autocomplete_input.h" | 16 #include "components/omnibox/autocomplete_input.h" |
17 #include "components/autocomplete/autocomplete_match.h" | 17 #include "components/omnibox/autocomplete_match.h" |
18 #include "components/autocomplete/autocomplete_provider_listener.h" | 18 #include "components/omnibox/autocomplete_provider_listener.h" |
19 #include "content/public/browser/notification_observer.h" | 19 #include "content/public/browser/notification_observer.h" |
20 #include "content/public/browser/notification_registrar.h" | 20 #include "content/public/browser/notification_registrar.h" |
21 | 21 |
22 #if !defined(ENABLE_EXTENSIONS) | 22 #if !defined(ENABLE_EXTENSIONS) |
23 #error "Should not be included when extensions are disabled" | 23 #error "Should not be included when extensions are disabled" |
24 #endif | 24 #endif |
25 | 25 |
26 class KeywordExtensionsDelegateImpl : public KeywordExtensionsDelegate, | 26 class KeywordExtensionsDelegateImpl : public KeywordExtensionsDelegate, |
27 public content::NotificationObserver { | 27 public content::NotificationObserver { |
28 public: | 28 public: |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 content::NotificationRegistrar registrar_; | 79 content::NotificationRegistrar registrar_; |
80 | 80 |
81 // We need our input IDs to be unique across all profiles, so we keep a global | 81 // We need our input IDs to be unique across all profiles, so we keep a global |
82 // UID that each provider uses. | 82 // UID that each provider uses. |
83 static int global_input_uid_; | 83 static int global_input_uid_; |
84 | 84 |
85 DISALLOW_COPY_AND_ASSIGN(KeywordExtensionsDelegateImpl); | 85 DISALLOW_COPY_AND_ASSIGN(KeywordExtensionsDelegateImpl); |
86 }; | 86 }; |
87 | 87 |
88 #endif // CHROME_BROWSER_AUTOCOMPLETE_KEYWORD_EXTENSIONS_DELEGATE_IMPL_H_ | 88 #endif // CHROME_BROWSER_AUTOCOMPLETE_KEYWORD_EXTENSIONS_DELEGATE_IMPL_H_ |
OLD | NEW |