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

Unified Diff: chrome/renderer/extensions/file_system_natives.cc

Issue 16032015: Extensions: pass ChromeV8Context around instead of v8::Handle. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 6 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
« no previous file with comments | « chrome/renderer/extensions/file_system_natives.h ('k') | chrome/renderer/extensions/i18n_custom_bindings.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/extensions/file_system_natives.cc
diff --git a/chrome/renderer/extensions/file_system_natives.cc b/chrome/renderer/extensions/file_system_natives.cc
index 1d73be009c517c88c998631b44e91f2e1cc2019c..7b28e48e2b0e0ffc5755da9859fd2a1f892e245f 100644
--- a/chrome/renderer/extensions/file_system_natives.cc
+++ b/chrome/renderer/extensions/file_system_natives.cc
@@ -9,6 +9,7 @@
#include "base/basictypes.h"
#include "base/logging.h"
#include "chrome/common/url_constants.h"
+#include "chrome/renderer/extensions/chrome_v8_context.h"
#include "chrome/renderer/extensions/user_script_slave.h"
#include "extensions/common/constants.h"
#include "grit/renderer_resources.h"
@@ -21,7 +22,7 @@
namespace extensions {
-FileSystemNatives::FileSystemNatives(v8::Handle<v8::Context> context)
+FileSystemNatives::FileSystemNatives(ChromeV8Context* context)
: ObjectBackedNativeHandler(context) {
RouteFunction("GetFileEntry",
base::Bind(&FileSystemNatives::GetFileEntry, base::Unretained(this)));
@@ -38,7 +39,8 @@ v8::Handle<v8::Value> FileSystemNatives::GetIsolatedFileSystem(
DCHECK(args.Length() == 1 || args.Length() == 2);
DCHECK(args[0]->IsString());
std::string file_system_id(*v8::String::Utf8Value(args[0]));
- WebKit::WebFrame* webframe = WebKit::WebFrame::frameForContext(v8_context());
+ WebKit::WebFrame* webframe =
+ WebKit::WebFrame::frameForContext(context()->v8_context());
DCHECK(webframe);
GURL context_url =
@@ -91,7 +93,8 @@ v8::Handle<v8::Value> FileSystemNatives::GetFileEntry(
DCHECK(args[4]->IsBoolean());
bool is_directory = args[4]->BooleanValue();
- WebKit::WebFrame* webframe = WebKit::WebFrame::frameForContext(v8_context());
+ WebKit::WebFrame* webframe =
+ WebKit::WebFrame::frameForContext(context()->v8_context());
DCHECK(webframe);
return webframe->createFileEntry(
type,
« no previous file with comments | « chrome/renderer/extensions/file_system_natives.h ('k') | chrome/renderer/extensions/i18n_custom_bindings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698