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

Side by Side Diff: extensions/renderer/content_watcher.cc

Issue 622343002: replace OVERRIDE and FINAL with override and final in extensions/ (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
« no previous file with comments | « extensions/renderer/console.cc ('k') | extensions/renderer/default_dispatcher_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "extensions/renderer/content_watcher.h" 5 #include "extensions/renderer/content_watcher.h"
6 6
7 #include "content/public/renderer/render_view.h" 7 #include "content/public/renderer/render_view.h"
8 #include "content/public/renderer/render_view_visitor.h" 8 #include "content/public/renderer/render_view_visitor.h"
9 #include "extensions/common/extension_messages.h" 9 #include "extensions/common/extension_messages.h"
10 #include "third_party/WebKit/public/web/WebDocument.h" 10 #include "third_party/WebKit/public/web/WebDocument.h"
(...skipping 28 matching lines...) Expand all
39 39
40 css_selectors_.swap(new_css_selectors); 40 css_selectors_.swap(new_css_selectors);
41 41
42 // Tell each frame's document about the new set of watched selectors. These 42 // Tell each frame's document about the new set of watched selectors. These
43 // will trigger calls to DidMatchCSS after Blink has a chance to apply the new 43 // will trigger calls to DidMatchCSS after Blink has a chance to apply the new
44 // style, which will in turn notify the browser about the changes. 44 // style, which will in turn notify the browser about the changes.
45 struct WatchSelectors : public content::RenderViewVisitor { 45 struct WatchSelectors : public content::RenderViewVisitor {
46 explicit WatchSelectors(const WebVector<WebString>& css_selectors) 46 explicit WatchSelectors(const WebVector<WebString>& css_selectors)
47 : css_selectors_(css_selectors) {} 47 : css_selectors_(css_selectors) {}
48 48
49 virtual bool Visit(content::RenderView* view) OVERRIDE { 49 virtual bool Visit(content::RenderView* view) override {
50 for (blink::WebFrame* frame = view->GetWebView()->mainFrame(); frame; 50 for (blink::WebFrame* frame = view->GetWebView()->mainFrame(); frame;
51 frame = frame->traverseNext(/*wrap=*/false)) 51 frame = frame->traverseNext(/*wrap=*/false))
52 frame->document().watchCSSSelectors(css_selectors_); 52 frame->document().watchCSSSelectors(css_selectors_);
53 53
54 return true; // Continue visiting. 54 return true; // Continue visiting.
55 } 55 }
56 56
57 const WebVector<WebString>& css_selectors_; 57 const WebVector<WebString>& css_selectors_;
58 }; 58 };
59 WatchSelectors visitor(css_selectors_); 59 WatchSelectors visitor(css_selectors_);
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 it != transitive_selectors.end(); 111 it != transitive_selectors.end();
112 ++it) 112 ++it)
113 selector_strings.push_back(it->as_string()); 113 selector_strings.push_back(it->as_string());
114 content::RenderView* view = 114 content::RenderView* view =
115 content::RenderView::FromWebView(top_frame->view()); 115 content::RenderView::FromWebView(top_frame->view());
116 view->Send(new ExtensionHostMsg_OnWatchedPageChange(view->GetRoutingID(), 116 view->Send(new ExtensionHostMsg_OnWatchedPageChange(view->GetRoutingID(),
117 selector_strings)); 117 selector_strings));
118 } 118 }
119 119
120 } // namespace extensions 120 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/renderer/console.cc ('k') | extensions/renderer/default_dispatcher_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698