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

Side by Side Diff: extensions/browser/api/declarative_content/content_rules_registry.h

Issue 764643002: Remove WebViewKey in rules registry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #ifndef EXTENSIONS_BROWSER_API_DECLARATIVE_CONTENT_CONTENT_RULES_REGISTRY_H__ 5 #ifndef EXTENSIONS_BROWSER_API_DECLARATIVE_CONTENT_CONTENT_RULES_REGISTRY_H__
6 #define EXTENSIONS_BROWSER_API_DECLARATIVE_CONTENT_CONTENT_RULES_REGISTRY_H__ 6 #define EXTENSIONS_BROWSER_API_DECLARATIVE_CONTENT_CONTENT_RULES_REGISTRY_H__
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "content/public/browser/browser_thread.h" 10 #include "content/public/browser/browser_thread.h"
(...skipping 11 matching lines...) Expand all
22 // This class acts as an //extensions-side interface for ContentRulesRegistry 22 // This class acts as an //extensions-side interface for ContentRulesRegistry
23 // to allow RulesRegistryService to be moved to //extensions. 23 // to allow RulesRegistryService to be moved to //extensions.
24 // TODO(wjmaclean): Remove this once ContentRulesRegistry moves to 24 // TODO(wjmaclean): Remove this once ContentRulesRegistry moves to
25 // //extensions. 25 // //extensions.
26 class ContentRulesRegistry : public RulesRegistry { 26 class ContentRulesRegistry : public RulesRegistry {
27 public: 27 public:
28 ContentRulesRegistry(content::BrowserContext* browser_context, 28 ContentRulesRegistry(content::BrowserContext* browser_context,
29 const std::string& event_name, 29 const std::string& event_name,
30 content::BrowserThread::ID owner_thread, 30 content::BrowserThread::ID owner_thread,
31 RulesCacheDelegate* cache_delegate, 31 RulesCacheDelegate* cache_delegate,
32 const WebViewKey& webview_key) 32 int rule_registry_id)
Fady Samuel 2014/11/26 23:39:41 rules_registry_id
Xi Han 2014/11/27 23:25:25 Done.
33 : RulesRegistry(browser_context, 33 : RulesRegistry(browser_context,
34 event_name, 34 event_name,
35 owner_thread, 35 owner_thread,
36 cache_delegate, 36 cache_delegate,
37 webview_key) {} 37 rule_registry_id) {}
Fady Samuel 2014/11/26 23:39:41 rules_registry_id
Xi Han 2014/11/27 23:25:25 Done.
38 38
39 // Applies all content rules given an update (CSS match change or 39 // Applies all content rules given an update (CSS match change or
40 // page navigation, for now) from the renderer. 40 // page navigation, for now) from the renderer.
41 virtual void Apply( 41 virtual void Apply(
42 content::WebContents* contents, 42 content::WebContents* contents,
43 const std::vector<std::string>& matching_css_selectors) = 0; 43 const std::vector<std::string>& matching_css_selectors) = 0;
44 44
45 // Applies all content rules given that a tab was just navigated. 45 // Applies all content rules given that a tab was just navigated.
46 virtual void DidNavigateMainFrame( 46 virtual void DidNavigateMainFrame(
47 content::WebContents* tab, 47 content::WebContents* tab,
48 const content::LoadCommittedDetails& details, 48 const content::LoadCommittedDetails& details,
49 const content::FrameNavigateParams& params) = 0; 49 const content::FrameNavigateParams& params) = 0;
50 50
51 protected: 51 protected:
52 ~ContentRulesRegistry() override {} 52 ~ContentRulesRegistry() override {}
53 53
54 private: 54 private:
55 DISALLOW_COPY_AND_ASSIGN(ContentRulesRegistry); 55 DISALLOW_COPY_AND_ASSIGN(ContentRulesRegistry);
56 }; 56 };
57 57
58 } // namespace extensions 58 } // namespace extensions
59 59
60 #endif // EXTENSIONS_BROWSER_API_DECLARATIVE_CONTENT_CONTENT_RULES_REGISTRY_H__ 60 #endif // EXTENSIONS_BROWSER_API_DECLARATIVE_CONTENT_CONTENT_RULES_REGISTRY_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698