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

Unified Diff: chrome/browser/extensions/api/declarative_content/declarative_content_css_condition_tracker.cc

Issue 2668003004: Convert extensions::TabHelper to use the new navigation callbacks. (Closed)
Patch Set: update Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/declarative_content/declarative_content_css_condition_tracker.cc
diff --git a/chrome/browser/extensions/api/declarative_content/declarative_content_css_condition_tracker.cc b/chrome/browser/extensions/api/declarative_content/declarative_content_css_condition_tracker.cc
index 82c25da9420a79651f09dc478b9f1c0f4130a672..2f52275a2f0b77ded6fbbed31ec0b8d0352a4758 100644
--- a/chrome/browser/extensions/api/declarative_content/declarative_content_css_condition_tracker.cc
+++ b/chrome/browser/extensions/api/declarative_content/declarative_content_css_condition_tracker.cc
@@ -14,7 +14,7 @@
#include "chrome/browser/extensions/api/declarative_content/content_constants.h"
#include "chrome/browser/extensions/api/declarative_content/content_predicate_evaluator.h"
#include "chrome/browser/profiles/profile.h"
-#include "content/public/browser/navigation_details.h"
+#include "content/public/browser/navigation_handle.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/render_process_host.h"
@@ -98,9 +98,8 @@ DeclarativeContentCssConditionTracker::PerWebContentsTracker::
}
void DeclarativeContentCssConditionTracker::PerWebContentsTracker::
-OnWebContentsNavigation(const content::LoadCommittedDetails& details,
- const content::FrameNavigateParams& params) {
- if (details.is_in_page) {
+OnWebContentsNavigation(content::NavigationHandle* navigation_handle) {
+ if (navigation_handle->IsSamePage()) {
// Within-page navigations don't change the set of elements that
// exist, and we only support filtering on the top-level URL, so
// this can't change which rules match.
@@ -232,10 +231,10 @@ void DeclarativeContentCssConditionTracker::TrackForWebContents(
void DeclarativeContentCssConditionTracker::OnWebContentsNavigation(
content::WebContents* contents,
- const content::LoadCommittedDetails& details,
- const content::FrameNavigateParams& params) {
+ content::NavigationHandle* navigation_handle) {
DCHECK(base::ContainsKey(per_web_contents_tracker_, contents));
- per_web_contents_tracker_[contents]->OnWebContentsNavigation(details, params);
+ per_web_contents_tracker_[contents]->OnWebContentsNavigation(
+ navigation_handle);
}
bool DeclarativeContentCssConditionTracker::EvaluatePredicate(

Powered by Google App Engine
This is Rietveld 408576698