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

Side by Side Diff: extensions/renderer/extension_helper.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
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/extension_helper.h" 5 #include "extensions/renderer/extension_helper.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/api/messaging/message.h" 9 #include "extensions/common/api/messaging/message.h"
10 #include "extensions/common/constants.h" 10 #include "extensions/common/constants.h"
(...skipping 29 matching lines...) Expand all
40 int browser_window_id, 40 int browser_window_id,
41 ViewType view_type) 41 ViewType view_type)
42 : extension_id_(extension_id), 42 : extension_id_(extension_id),
43 browser_window_id_(browser_window_id), 43 browser_window_id_(browser_window_id),
44 view_type_(view_type) { 44 view_type_(view_type) {
45 } 45 }
46 46
47 std::vector<content::RenderView*> views() { return views_; } 47 std::vector<content::RenderView*> views() { return views_; }
48 48
49 // Returns false to terminate the iteration. 49 // Returns false to terminate the iteration.
50 virtual bool Visit(content::RenderView* render_view) OVERRIDE { 50 virtual bool Visit(content::RenderView* render_view) override {
51 ExtensionHelper* helper = ExtensionHelper::Get(render_view); 51 ExtensionHelper* helper = ExtensionHelper::Get(render_view);
52 if (!ViewTypeMatches(helper->view_type(), view_type_)) 52 if (!ViewTypeMatches(helper->view_type(), view_type_))
53 return true; 53 return true;
54 54
55 GURL url = render_view->GetWebView()->mainFrame()->document().url(); 55 GURL url = render_view->GetWebView()->mainFrame()->document().url();
56 if (!url.SchemeIs(kExtensionScheme)) 56 if (!url.SchemeIs(kExtensionScheme))
57 return true; 57 return true;
58 const std::string& extension_id = url.host(); 58 const std::string& extension_id = url.host();
59 if (extension_id != extension_id_) 59 if (extension_id != extension_id_)
60 return true; 60 return true;
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 render_view()->GetWebView()->mainFrame()->mainWorldScriptContext(); 256 render_view()->GetWebView()->mainFrame()->mainWorldScriptContext();
257 ScriptContext* script_context = 257 ScriptContext* script_context =
258 dispatcher_->script_context_set().GetByV8Context(v8_context); 258 dispatcher_->script_context_set().GetByV8Context(v8_context);
259 if (!script_context) 259 if (!script_context)
260 return; 260 return;
261 script_context->module_system()->CallModuleMethod("app.window", 261 script_context->module_system()->CallModuleMethod("app.window",
262 "onAppWindowClosed"); 262 "onAppWindowClosed");
263 } 263 }
264 264
265 } // namespace extensions 265 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/renderer/extension_helper.h ('k') | extensions/renderer/extensions_render_frame_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698