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

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: merge with NavigationHandle 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
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 11 matching lines...) Expand all
40 : RulesRegistry(browser_context, 39 : RulesRegistry(browser_context,
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.
Devlin 2017/02/01 23:18:22 nit: while you're here, mind adding something like
jam 2017/02/01 23:48:49 Done.
51 virtual void DidNavigateMainFrame( 50 virtual void DidFinishNavigation(
52 content::WebContents* tab, 51 content::WebContents* tab,
53 const content::LoadCommittedDetails& details, 52 content::NavigationHandle* navigation_handle) = 0;
54 const content::FrameNavigateParams& params) = 0;
55 53
56 protected: 54 protected:
57 ~ContentRulesRegistry() override {} 55 ~ContentRulesRegistry() override {}
58 56
59 private: 57 private:
60 DISALLOW_COPY_AND_ASSIGN(ContentRulesRegistry); 58 DISALLOW_COPY_AND_ASSIGN(ContentRulesRegistry);
61 }; 59 };
62 60
63 } // namespace extensions 61 } // namespace extensions
64 62
65 #endif // EXTENSIONS_BROWSER_API_DECLARATIVE_CONTENT_CONTENT_RULES_REGISTRY_H__ 63 #endif // EXTENSIONS_BROWSER_API_DECLARATIVE_CONTENT_CONTENT_RULES_REGISTRY_H__
OLDNEW
« chrome/browser/extensions/tab_helper.cc ('K') | « chrome/browser/extensions/tab_helper.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698