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

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

Issue 10392127: Move declarative API into events API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix change schema type reference from 'Event' to 'events.Event' 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
« no previous file with comments | « chrome/renderer/extensions/event_unittest.cc ('k') | chrome/renderer/renderer_resources.grd » ('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 (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 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 source_map_.RegisterSource("miscellaneous_bindings", 501 source_map_.RegisterSource("miscellaneous_bindings",
502 IDR_MISCELLANEOUS_BINDINGS_JS); 502 IDR_MISCELLANEOUS_BINDINGS_JS);
503 source_map_.RegisterSource("schema_generated_bindings", 503 source_map_.RegisterSource("schema_generated_bindings",
504 IDR_SCHEMA_GENERATED_BINDINGS_JS); 504 IDR_SCHEMA_GENERATED_BINDINGS_JS);
505 source_map_.RegisterSource("json_schema", IDR_JSON_SCHEMA_JS); 505 source_map_.RegisterSource("json_schema", IDR_JSON_SCHEMA_JS);
506 source_map_.RegisterSource("apitest", IDR_EXTENSION_APITEST_JS); 506 source_map_.RegisterSource("apitest", IDR_EXTENSION_APITEST_JS);
507 507
508 // Libraries. 508 // Libraries.
509 source_map_.RegisterSource("sendRequest", IDR_SEND_REQUEST_JS); 509 source_map_.RegisterSource("sendRequest", IDR_SEND_REQUEST_JS);
510 source_map_.RegisterSource("setIcon", IDR_SET_ICON_JS); 510 source_map_.RegisterSource("setIcon", IDR_SET_ICON_JS);
511 source_map_.RegisterSource("utils", IDR_UTILS_JS);
511 512
512 // Custom bindings. 513 // Custom bindings.
513 source_map_.RegisterSource("app", IDR_APP_CUSTOM_BINDINGS_JS); 514 source_map_.RegisterSource("app", IDR_APP_CUSTOM_BINDINGS_JS);
514 source_map_.RegisterSource("browserAction", 515 source_map_.RegisterSource("browserAction",
515 IDR_BROWSER_ACTION_CUSTOM_BINDINGS_JS); 516 IDR_BROWSER_ACTION_CUSTOM_BINDINGS_JS);
516 source_map_.RegisterSource("contentSettings", 517 source_map_.RegisterSource("contentSettings",
517 IDR_CONTENT_SETTINGS_CUSTOM_BINDINGS_JS); 518 IDR_CONTENT_SETTINGS_CUSTOM_BINDINGS_JS);
518 source_map_.RegisterSource("contextMenus", 519 source_map_.RegisterSource("contextMenus",
519 IDR_CONTEXT_MENUS_CUSTOM_BINDINGS_JS); 520 IDR_CONTEXT_MENUS_CUSTOM_BINDINGS_JS);
520 source_map_.RegisterSource("declarative",
521 IDR_DECLARATIVE_CUSTOM_BINDINGS_JS);
522 source_map_.RegisterSource("declarativeWebRequest", 521 source_map_.RegisterSource("declarativeWebRequest",
523 IDR_DECLARATIVE_WEBREQUEST_CUSTOM_BINDINGS_JS); 522 IDR_DECLARATIVE_WEBREQUEST_CUSTOM_BINDINGS_JS);
524 source_map_.RegisterSource("devtools", IDR_DEVTOOLS_CUSTOM_BINDINGS_JS); 523 source_map_.RegisterSource("devtools", IDR_DEVTOOLS_CUSTOM_BINDINGS_JS);
525 source_map_.RegisterSource("experimental.mediaGalleries", 524 source_map_.RegisterSource("experimental.mediaGalleries",
526 IDR_MEDIA_GALLERY_CUSTOM_BINDINGS_JS); 525 IDR_MEDIA_GALLERY_CUSTOM_BINDINGS_JS);
527 source_map_.RegisterSource("experimental.offscreen", 526 source_map_.RegisterSource("experimental.offscreen",
528 IDR_EXPERIMENTAL_OFFSCREENTABS_CUSTOM_BINDINGS_JS); 527 IDR_EXPERIMENTAL_OFFSCREENTABS_CUSTOM_BINDINGS_JS);
529 source_map_.RegisterSource("experimental.runtime", 528 source_map_.RegisterSource("experimental.runtime",
530 IDR_EXPERIMENTAL_RUNTIME_CUSTOM_BINDINGS_JS); 529 IDR_EXPERIMENTAL_RUNTIME_CUSTOM_BINDINGS_JS);
531 source_map_.RegisterSource("experimental.usb", 530 source_map_.RegisterSource("experimental.usb",
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
899 static const char kMessage[] = 898 static const char kMessage[] =
900 "%s can only be used in an extension process."; 899 "%s can only be used in an extension process.";
901 std::string error_msg = base::StringPrintf(kMessage, function_name.c_str()); 900 std::string error_msg = base::StringPrintf(kMessage, function_name.c_str());
902 v8::ThrowException( 901 v8::ThrowException(
903 v8::Exception::Error(v8::String::New(error_msg.c_str()))); 902 v8::Exception::Error(v8::String::New(error_msg.c_str())));
904 return false; 903 return false;
905 } 904 }
906 905
907 return true; 906 return true;
908 } 907 }
OLDNEW
« no previous file with comments | « chrome/renderer/extensions/event_unittest.cc ('k') | chrome/renderer/renderer_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698