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

Side by Side Diff: chrome/renderer/extensions/extension_dispatcher.cc

Issue 10392008: Move declarative API into events API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/renderer/extensions/extension_dispatcher.h" 5 #include "chrome/renderer/extensions/extension_dispatcher.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/string_piece.h" 10 #include "base/string_piece.h"
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 source_map_.RegisterSource("setIcon", IDR_SET_ICON_JS); 506 source_map_.RegisterSource("setIcon", IDR_SET_ICON_JS);
507 507
508 // Custom bindings. 508 // Custom bindings.
509 source_map_.RegisterSource("app", IDR_APP_CUSTOM_BINDINGS_JS); 509 source_map_.RegisterSource("app", IDR_APP_CUSTOM_BINDINGS_JS);
510 source_map_.RegisterSource("browserAction", 510 source_map_.RegisterSource("browserAction",
511 IDR_BROWSER_ACTION_CUSTOM_BINDINGS_JS); 511 IDR_BROWSER_ACTION_CUSTOM_BINDINGS_JS);
512 source_map_.RegisterSource("contentSettings", 512 source_map_.RegisterSource("contentSettings",
513 IDR_CONTENT_SETTINGS_CUSTOM_BINDINGS_JS); 513 IDR_CONTENT_SETTINGS_CUSTOM_BINDINGS_JS);
514 source_map_.RegisterSource("contextMenus", 514 source_map_.RegisterSource("contextMenus",
515 IDR_CONTEXT_MENUS_CUSTOM_BINDINGS_JS); 515 IDR_CONTEXT_MENUS_CUSTOM_BINDINGS_JS);
516 source_map_.RegisterSource("declarative",
517 IDR_DECLARATIVE_CUSTOM_BINDINGS_JS);
518 source_map_.RegisterSource("declarativeWebRequest", 516 source_map_.RegisterSource("declarativeWebRequest",
519 IDR_DECLARATIVE_WEBREQUEST_CUSTOM_BINDINGS_JS); 517 IDR_DECLARATIVE_WEBREQUEST_CUSTOM_BINDINGS_JS);
520 source_map_.RegisterSource("devtools", IDR_DEVTOOLS_CUSTOM_BINDINGS_JS); 518 source_map_.RegisterSource("devtools", IDR_DEVTOOLS_CUSTOM_BINDINGS_JS);
521 source_map_.RegisterSource("experimental.offscreen", 519 source_map_.RegisterSource("experimental.offscreen",
522 IDR_EXPERIMENTAL_OFFSCREENTABS_CUSTOM_BINDINGS_JS); 520 IDR_EXPERIMENTAL_OFFSCREENTABS_CUSTOM_BINDINGS_JS);
523 source_map_.RegisterSource("experimental.runtime", 521 source_map_.RegisterSource("experimental.runtime",
524 IDR_EXPERIMENTAL_RUNTIME_CUSTOM_BINDINGS_JS); 522 IDR_EXPERIMENTAL_RUNTIME_CUSTOM_BINDINGS_JS);
525 source_map_.RegisterSource("experimental.usb", 523 source_map_.RegisterSource("experimental.usb",
526 IDR_EXPERIMENTAL_USB_CUSTOM_BINDINGS_JS); 524 IDR_EXPERIMENTAL_USB_CUSTOM_BINDINGS_JS);
527 source_map_.RegisterSource("extension", IDR_EXTENSION_CUSTOM_BINDINGS_JS); 525 source_map_.RegisterSource("extension", IDR_EXTENSION_CUSTOM_BINDINGS_JS);
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
893 static const char kMessage[] = 891 static const char kMessage[] =
894 "%s can only be used in an extension process."; 892 "%s can only be used in an extension process.";
895 std::string error_msg = base::StringPrintf(kMessage, function_name.c_str()); 893 std::string error_msg = base::StringPrintf(kMessage, function_name.c_str());
896 v8::ThrowException( 894 v8::ThrowException(
897 v8::Exception::Error(v8::String::New(error_msg.c_str()))); 895 v8::Exception::Error(v8::String::New(error_msg.c_str())));
898 return false; 896 return false;
899 } 897 }
900 898
901 return true; 899 return true;
902 } 900 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698