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

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

Issue 2668003004: Convert extensions::TabHelper to use the new navigation callbacks. (Closed)
Patch Set: update Created 3 years, 10 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
« no previous file with comments | « chrome/browser/extensions/tab_helper.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/macros.h" 10 #include "base/macros.h"
11 #include "content/public/browser/browser_thread.h" 11 #include "content/public/browser/browser_thread.h"
12 #include "extensions/browser/api/declarative/rules_registry.h" 12 #include "extensions/browser/api/declarative/rules_registry.h"
13 13
14 namespace content { 14 namespace content {
15 class BrowserContext; 15 class BrowserContext;
16 class NavigationHandle;
16 class WebContents; 17 class WebContents;
17 struct FrameNavigateParams;
18 struct LoadCommittedDetails;
19 } 18 }
20 19
21 namespace extensions { 20 namespace extensions {
22 21
23 // This class acts as an //extensions-side interface for ContentRulesRegistry 22 // This class acts as an //extensions-side interface for ContentRulesRegistry
24 // to allow RulesRegistryService to be moved to //extensions. 23 // to allow RulesRegistryService to be moved to //extensions.
25 // TODO(wjmaclean): Remove this once ContentRulesRegistry moves to 24 // TODO(wjmaclean): Remove this once ContentRulesRegistry moves to
26 // //extensions. 25 // //extensions.
27 // 26 //
28 // Note: when dealing with WebContents associated with OffTheRecord contexts, 27 // Note: when dealing with WebContents associated with OffTheRecord contexts,
(...skipping 12 matching lines...) Expand all
41 event_name, 40 event_name,
42 owner_thread, 41 owner_thread,
43 cache_delegate, 42 cache_delegate,
44 rules_registry_id) {} 43 rules_registry_id) {}
45 44
46 // Notifies the registry that it should evaluate rules for |contents|. 45 // Notifies the registry that it should evaluate rules for |contents|.
47 virtual void MonitorWebContentsForRuleEvaluation( 46 virtual void MonitorWebContentsForRuleEvaluation(
48 content::WebContents* contents) = 0; 47 content::WebContents* contents) = 0;
49 48
50 // Applies all content rules given that a tab was just navigated. 49 // Applies all content rules given that a tab was just navigated.
51 virtual void DidNavigateMainFrame( 50 // This corresponds to the notification of the same name in
51 // content::WebContentsObserver.
52 virtual void DidFinishNavigation(
52 content::WebContents* tab, 53 content::WebContents* tab,
53 const content::LoadCommittedDetails& details, 54 content::NavigationHandle* navigation_handle) = 0;
54 const content::FrameNavigateParams& params) = 0;
55 55
56 protected: 56 protected:
57 ~ContentRulesRegistry() override {} 57 ~ContentRulesRegistry() override {}
58 58
59 private: 59 private:
60 DISALLOW_COPY_AND_ASSIGN(ContentRulesRegistry); 60 DISALLOW_COPY_AND_ASSIGN(ContentRulesRegistry);
61 }; 61 };
62 62
63 } // namespace extensions 63 } // namespace extensions
64 64
65 #endif // EXTENSIONS_BROWSER_API_DECLARATIVE_CONTENT_CONTENT_RULES_REGISTRY_H__ 65 #endif // EXTENSIONS_BROWSER_API_DECLARATIVE_CONTENT_CONTENT_RULES_REGISTRY_H__
OLDNEW
« no previous file with comments | « chrome/browser/extensions/tab_helper.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698