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

Unified Diff: chrome/renderer/extensions/experimental.app_custom_bindings.cc

Issue 10834261: Move chrome.experimental.app.onLaunched event handler to chrome.app.runtime.onLaunched. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Another merge before retrying commit. Created 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/renderer/extensions/experimental.app_custom_bindings.cc
diff --git a/chrome/renderer/extensions/experimental.app_custom_bindings.cc b/chrome/renderer/extensions/experimental.app_custom_bindings.cc
deleted file mode 100644
index 7e735d2a94913fd05d95249735b7cb744cbc31ad..0000000000000000000000000000000000000000
--- a/chrome/renderer/extensions/experimental.app_custom_bindings.cc
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/renderer/extensions/experimental.app_custom_bindings.h"
-
-#include "base/string_number_conversions.h"
-#include "third_party/WebKit/Source/WebKit/chromium/public/WebBlob.h"
-#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSerializedScriptValue.h"
-#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
-
-using WebKit::WebBlob;
-using WebKit::WebSerializedScriptValue;
-using WebKit::WebString;
-
-namespace {
-
-v8::Handle<v8::Value> DeserializeString(const v8::Arguments &args) {
- DCHECK(args.Length() == 1);
- DCHECK(args[0]->IsString());
-
- std::string data_v8(*v8::String::Utf8Value(args[0]));
- WebString data_webstring = WebString::fromUTF8(data_v8);
- WebSerializedScriptValue serialized =
- WebSerializedScriptValue::fromString(data_webstring);
- return serialized.deserialize();
-}
-
-v8::Handle<v8::Value> CreateBlob(const v8::Arguments &args) {
- DCHECK(args.Length() == 2);
- DCHECK(args[0]->IsString());
- DCHECK(args[1]->IsNumber());
-
- std::string blob_file_path(*v8::String::Utf8Value(args[0]));
- std::string blob_length_string(*v8::String::Utf8Value(args[1]));
- int64 blob_length = 0;
- DCHECK(base::StringToInt64(blob_length_string, &blob_length));
- WebKit::WebBlob web_blob = WebBlob::createFromFile(
- WebString::fromUTF8(blob_file_path), blob_length);
- return web_blob.toV8Value();
-}
-
-} // namespace
-
-namespace extensions {
-
-ExperimentalAppCustomBindings::ExperimentalAppCustomBindings()
- : ChromeV8Extension(NULL) {
- RouteStaticFunction("DeserializeString", &DeserializeString);
- RouteStaticFunction("CreateBlob", &CreateBlob);
-}
-
-} // namespace extensions
« no previous file with comments | « chrome/renderer/extensions/experimental.app_custom_bindings.h ('k') | chrome/renderer/renderer_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698