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

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

Issue 444133003: Try run for https://codereview.chromium.org/426593007. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: app view fix Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « extensions/common/api/_api_features.json ('k') | no next file » | 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/dispatcher.h" 5 #include "extensions/renderer/dispatcher.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/alias.h" 10 #include "base/debug/alias.h"
(...skipping 1153 matching lines...) Expand 10 before | Expand all | Expand 10 after
1164 } 1164 }
1165 } 1165 }
1166 return false; 1166 return false;
1167 } 1167 }
1168 1168
1169 Feature::Context Dispatcher::ClassifyJavaScriptContext( 1169 Feature::Context Dispatcher::ClassifyJavaScriptContext(
1170 const Extension* extension, 1170 const Extension* extension,
1171 int extension_group, 1171 int extension_group,
1172 const GURL& url, 1172 const GURL& url,
1173 const blink::WebSecurityOrigin& origin) { 1173 const blink::WebSecurityOrigin& origin) {
1174 // WARNING: This logic must match ProcessMap::GuessContextType, as much as
1175 // possible.
1176
1174 DCHECK_GE(extension_group, 0); 1177 DCHECK_GE(extension_group, 0);
1175 if (extension_group == EXTENSION_GROUP_CONTENT_SCRIPTS) { 1178 if (extension_group == EXTENSION_GROUP_CONTENT_SCRIPTS) {
1176 return extension ? // TODO(kalman): when does this happen? 1179 return extension ? // TODO(kalman): when does this happen?
1177 Feature::CONTENT_SCRIPT_CONTEXT 1180 Feature::CONTENT_SCRIPT_CONTEXT
1178 : Feature::UNSPECIFIED_CONTEXT; 1181 : Feature::UNSPECIFIED_CONTEXT;
1179 } 1182 }
1180 1183
1181 // We have an explicit check for sandboxed pages before checking whether the 1184 // We have an explicit check for sandboxed pages before checking whether the
1182 // extension is active in this process because: 1185 // extension is active in this process because:
1183 // 1. Sandboxed pages run in the same process as regular extension pages, so 1186 // 1. Sandboxed pages run in the same process as regular extension pages, so
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
1285 return v8::Handle<v8::Object>(); 1288 return v8::Handle<v8::Object>();
1286 1289
1287 if (bind_name) 1290 if (bind_name)
1288 *bind_name = split.back(); 1291 *bind_name = split.back();
1289 1292
1290 return bind_object.IsEmpty() ? AsObjectOrEmpty(GetOrCreateChrome(context)) 1293 return bind_object.IsEmpty() ? AsObjectOrEmpty(GetOrCreateChrome(context))
1291 : bind_object; 1294 : bind_object;
1292 } 1295 }
1293 1296
1294 } // namespace extensions 1297 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/common/api/_api_features.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698