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

Side by Side Diff: chrome/browser/autocomplete/keyword_extensions_delegate_impl.h

Issue 648653003: Standardize usage of virtual/override/final in chrome/browser/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 unified diff | Download patch
OLDNEW
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
(...skipping 11 matching lines...) Expand all
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 Profile; 26 class Profile;
27 27
28 class KeywordExtensionsDelegateImpl : public KeywordExtensionsDelegate, 28 class KeywordExtensionsDelegateImpl : public KeywordExtensionsDelegate,
29 public content::NotificationObserver { 29 public content::NotificationObserver {
30 public: 30 public:
31 KeywordExtensionsDelegateImpl(Profile* profile, KeywordProvider* provider); 31 KeywordExtensionsDelegateImpl(Profile* profile, KeywordProvider* provider);
32 virtual ~KeywordExtensionsDelegateImpl(); 32 ~KeywordExtensionsDelegateImpl() override;
33 33
34 private: 34 private:
35 // KeywordExtensionsDelegate: 35 // KeywordExtensionsDelegate:
36 virtual void IncrementInputId() override; 36 void IncrementInputId() override;
37 virtual bool IsEnabledExtension(const std::string& extension_id) override; 37 bool IsEnabledExtension(const std::string& extension_id) override;
38 virtual bool Start(const AutocompleteInput& input, 38 bool Start(const AutocompleteInput& input,
39 bool minimal_changes, 39 bool minimal_changes,
40 const TemplateURL* template_url, 40 const TemplateURL* template_url,
41 const base::string16& remaining_input) override; 41 const base::string16& remaining_input) override;
42 virtual void EnterExtensionKeywordMode( 42 void EnterExtensionKeywordMode(const std::string& extension_id) override;
43 const std::string& extension_id) override; 43 void MaybeEndExtensionKeywordMode() override;
44 virtual void MaybeEndExtensionKeywordMode() override;
45 44
46 // content::NotificationObserver: 45 // content::NotificationObserver:
47 virtual void Observe(int type, 46 void Observe(int type,
48 const content::NotificationSource& source, 47 const content::NotificationSource& source,
49 const content::NotificationDetails& details) override; 48 const content::NotificationDetails& details) override;
50 49
51 ACMatches* matches() { return &provider_->matches_; } 50 ACMatches* matches() { return &provider_->matches_; }
52 void set_done(bool done) { 51 void set_done(bool done) {
53 provider_->done_ = done; 52 provider_->done_ = done;
54 } 53 }
55 54
56 // Notifies the KeywordProvider about asynchronous updates from the extension. 55 // Notifies the KeywordProvider about asynchronous updates from the extension.
57 void OnProviderUpdate(bool updated_matches); 56 void OnProviderUpdate(bool updated_matches);
58 57
59 // Identifies the current input state. This is incremented each time the 58 // Identifies the current input state. This is incremented each time the
(...skipping 21 matching lines...) Expand all
81 content::NotificationRegistrar registrar_; 80 content::NotificationRegistrar registrar_;
82 81
83 // We need our input IDs to be unique across all profiles, so we keep a global 82 // We need our input IDs to be unique across all profiles, so we keep a global
84 // UID that each provider uses. 83 // UID that each provider uses.
85 static int global_input_uid_; 84 static int global_input_uid_;
86 85
87 DISALLOW_COPY_AND_ASSIGN(KeywordExtensionsDelegateImpl); 86 DISALLOW_COPY_AND_ASSIGN(KeywordExtensionsDelegateImpl);
88 }; 87 };
89 88
90 #endif // CHROME_BROWSER_AUTOCOMPLETE_KEYWORD_EXTENSIONS_DELEGATE_IMPL_H_ 89 #endif // CHROME_BROWSER_AUTOCOMPLETE_KEYWORD_EXTENSIONS_DELEGATE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698