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

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

Issue 1773813007: blink: Rename modules/ method to prefix with get when they collide. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clash-modules: rebase-fixes Created 4 years, 9 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/content_watcher.cc ('k') | extensions/renderer/extension_injection_host.cc » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_frame_helper.h" 5 #include "extensions/renderer/extension_frame_helper.h"
6 6
7 #include "base/strings/string_util.h" 7 #include "base/strings/string_util.h"
8 #include "content/public/renderer/render_frame.h" 8 #include "content/public/renderer/render_frame.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 26 matching lines...) Expand all
37 frame_helper->view_type() != match_view_type) 37 frame_helper->view_type() != match_view_type)
38 return false; 38 return false;
39 39
40 // Not all frames have a valid ViewType, e.g. devtools, most GuestViews, and 40 // Not all frames have a valid ViewType, e.g. devtools, most GuestViews, and
41 // unclassified detached WebContents. 41 // unclassified detached WebContents.
42 if (frame_helper->view_type() == VIEW_TYPE_INVALID) 42 if (frame_helper->view_type() == VIEW_TYPE_INVALID)
43 return false; 43 return false;
44 44
45 // This logic matches ExtensionWebContentsObserver::GetExtensionFromFrame. 45 // This logic matches ExtensionWebContentsObserver::GetExtensionFromFrame.
46 blink::WebSecurityOrigin origin = 46 blink::WebSecurityOrigin origin =
47 frame_helper->render_frame()->GetWebFrame()->securityOrigin(); 47 frame_helper->render_frame()->GetWebFrame()->getSecurityOrigin();
48 if (origin.isUnique() || 48 if (origin.isUnique() ||
49 !base::EqualsASCII(base::StringPiece16(origin.protocol()), 49 !base::EqualsASCII(base::StringPiece16(origin.protocol()),
50 kExtensionScheme) || 50 kExtensionScheme) ||
51 !base::EqualsASCII(base::StringPiece16(origin.host()), 51 !base::EqualsASCII(base::StringPiece16(origin.host()),
52 match_extension_id.c_str())) 52 match_extension_id.c_str()))
53 return false; 53 return false;
54 54
55 if (match_window_id != extension_misc::kUnknownWindowId && 55 if (match_window_id != extension_misc::kUnknownWindowId &&
56 frame_helper->browser_window_id() != match_window_id) 56 frame_helper->browser_window_id() != match_window_id)
57 return false; 57 return false;
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 const std::string& module_name, 228 const std::string& module_name,
229 const std::string& function_name, 229 const std::string& function_name,
230 const base::ListValue& args, 230 const base::ListValue& args,
231 bool user_gesture) { 231 bool user_gesture) {
232 extension_dispatcher_->InvokeModuleSystemMethod(render_frame(), extension_id, 232 extension_dispatcher_->InvokeModuleSystemMethod(render_frame(), extension_id,
233 module_name, function_name, 233 module_name, function_name,
234 args, user_gesture); 234 args, user_gesture);
235 } 235 }
236 236
237 } // namespace extensions 237 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/renderer/content_watcher.cc ('k') | extensions/renderer/extension_injection_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698