Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 30 matching lines...) Expand all Loading... | |
| 41 #include "ui/base/resource/resource_bundle.h" | 41 #include "ui/base/resource/resource_bundle.h" |
| 42 #include "v8/include/v8.h" | 42 #include "v8/include/v8.h" |
| 43 | 43 |
| 44 #include "chrome/renderer/extensions/chrome_private_custom_bindings.h" | 44 #include "chrome/renderer/extensions/chrome_private_custom_bindings.h" |
| 45 #include "chrome/renderer/extensions/context_menus_custom_bindings.h" | 45 #include "chrome/renderer/extensions/context_menus_custom_bindings.h" |
| 46 #include "chrome/renderer/extensions/experimental.socket_custom_bindings.h" | 46 #include "chrome/renderer/extensions/experimental.socket_custom_bindings.h" |
| 47 #include "chrome/renderer/extensions/extension_custom_bindings.h" | 47 #include "chrome/renderer/extensions/extension_custom_bindings.h" |
| 48 #include "chrome/renderer/extensions/file_browser_handler_custom_bindings.h" | 48 #include "chrome/renderer/extensions/file_browser_handler_custom_bindings.h" |
| 49 #include "chrome/renderer/extensions/file_browser_private_custom_bindings.h" | 49 #include "chrome/renderer/extensions/file_browser_private_custom_bindings.h" |
| 50 #include "chrome/renderer/extensions/i18n_custom_bindings.h" | 50 #include "chrome/renderer/extensions/i18n_custom_bindings.h" |
| 51 #include "chrome/renderer/extensions/media_gallery_custom_bindings.h" | |
| 51 #include "chrome/renderer/extensions/page_actions_custom_bindings.h" | 52 #include "chrome/renderer/extensions/page_actions_custom_bindings.h" |
| 52 #include "chrome/renderer/extensions/page_capture_custom_bindings.h" | 53 #include "chrome/renderer/extensions/page_capture_custom_bindings.h" |
| 53 #include "chrome/renderer/extensions/tabs_custom_bindings.h" | 54 #include "chrome/renderer/extensions/tabs_custom_bindings.h" |
| 54 #include "chrome/renderer/extensions/tts_custom_bindings.h" | 55 #include "chrome/renderer/extensions/tts_custom_bindings.h" |
| 55 #include "chrome/renderer/extensions/web_request_custom_bindings.h" | 56 #include "chrome/renderer/extensions/web_request_custom_bindings.h" |
| 56 | 57 |
| 57 using content::RenderThread; | 58 using content::RenderThread; |
| 58 using extensions::ChromePrivateCustomBindings; | 59 using extensions::ChromePrivateCustomBindings; |
| 59 using extensions::ContextMenusCustomBindings; | 60 using extensions::ContextMenusCustomBindings; |
| 60 using extensions::ExperimentalSocketCustomBindings; | 61 using extensions::ExperimentalSocketCustomBindings; |
| 61 using extensions::ExtensionCustomBindings; | 62 using extensions::ExtensionCustomBindings; |
| 62 using extensions::FileBrowserHandlerCustomBindings; | 63 using extensions::FileBrowserHandlerCustomBindings; |
| 63 using extensions::FileBrowserPrivateCustomBindings; | 64 using extensions::FileBrowserPrivateCustomBindings; |
| 64 using extensions::I18NCustomBindings; | 65 using extensions::I18NCustomBindings; |
| 65 using extensions::MiscellaneousBindings; | 66 using extensions::MiscellaneousBindings; |
| 67 using extensions::MediaGalleryCustomBindings; | |
| 66 using extensions::PageActionsCustomBindings; | 68 using extensions::PageActionsCustomBindings; |
| 67 using extensions::PageCaptureCustomBindings; | 69 using extensions::PageCaptureCustomBindings; |
| 68 using extensions::SchemaGeneratedBindings; | 70 using extensions::SchemaGeneratedBindings; |
| 69 using extensions::TTSCustomBindings; | 71 using extensions::TTSCustomBindings; |
| 70 using extensions::TabsCustomBindings; | 72 using extensions::TabsCustomBindings; |
| 71 using extensions::WebRequestCustomBindings; | 73 using extensions::WebRequestCustomBindings; |
| 72 using WebKit::WebDataSource; | 74 using WebKit::WebDataSource; |
| 73 using WebKit::WebDocument; | 75 using WebKit::WebDocument; |
| 74 using WebKit::WebFrame; | 76 using WebKit::WebFrame; |
| 75 using WebKit::WebSecurityPolicy; | 77 using WebKit::WebSecurityPolicy; |
| (...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 434 scoped_ptr<NativeHandler>( | 436 scoped_ptr<NativeHandler>( |
| 435 new ExtensionCustomBindings(this))); | 437 new ExtensionCustomBindings(this))); |
| 436 module_system->RegisterNativeHandler("experimental_socket", | 438 module_system->RegisterNativeHandler("experimental_socket", |
| 437 scoped_ptr<NativeHandler>(new ExperimentalSocketCustomBindings())); | 439 scoped_ptr<NativeHandler>(new ExperimentalSocketCustomBindings())); |
| 438 module_system->RegisterNativeHandler("file_browser_handler", | 440 module_system->RegisterNativeHandler("file_browser_handler", |
| 439 scoped_ptr<NativeHandler>(new FileBrowserHandlerCustomBindings())); | 441 scoped_ptr<NativeHandler>(new FileBrowserHandlerCustomBindings())); |
| 440 module_system->RegisterNativeHandler("file_browser_private", | 442 module_system->RegisterNativeHandler("file_browser_private", |
| 441 scoped_ptr<NativeHandler>(new FileBrowserPrivateCustomBindings())); | 443 scoped_ptr<NativeHandler>(new FileBrowserPrivateCustomBindings())); |
| 442 module_system->RegisterNativeHandler("i18n", | 444 module_system->RegisterNativeHandler("i18n", |
| 443 scoped_ptr<NativeHandler>(new I18NCustomBindings())); | 445 scoped_ptr<NativeHandler>(new I18NCustomBindings())); |
| 446 module_system->RegisterNativeHandler("experimental_mediaGalleries", | |
|
vandebo (ex-Chrome)
2012/03/21 16:17:57
Alphabetization fixed here too.
| |
| 447 scoped_ptr<NativeHandler>(new MediaGalleryCustomBindings())); | |
| 444 module_system->RegisterNativeHandler("page_actions", | 448 module_system->RegisterNativeHandler("page_actions", |
| 445 scoped_ptr<NativeHandler>( | 449 scoped_ptr<NativeHandler>( |
| 446 new PageActionsCustomBindings(this))); | 450 new PageActionsCustomBindings(this))); |
| 447 module_system->RegisterNativeHandler("page_capture", | 451 module_system->RegisterNativeHandler("page_capture", |
| 448 scoped_ptr<NativeHandler>(new PageCaptureCustomBindings())); | 452 scoped_ptr<NativeHandler>(new PageCaptureCustomBindings())); |
| 449 module_system->RegisterNativeHandler("tabs", | 453 module_system->RegisterNativeHandler("tabs", |
| 450 scoped_ptr<NativeHandler>(new TabsCustomBindings())); | 454 scoped_ptr<NativeHandler>(new TabsCustomBindings())); |
| 451 module_system->RegisterNativeHandler("tts", | 455 module_system->RegisterNativeHandler("tts", |
| 452 scoped_ptr<NativeHandler>(new TTSCustomBindings())); | 456 scoped_ptr<NativeHandler>(new TTSCustomBindings())); |
| 453 module_system->RegisterNativeHandler("web_request", | 457 module_system->RegisterNativeHandler("web_request", |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 480 IDR_EXPERIMENTAL_DECLARATIVE_CUSTOM_BINDINGS_JS); | 484 IDR_EXPERIMENTAL_DECLARATIVE_CUSTOM_BINDINGS_JS); |
| 481 source_map_.RegisterSource("experimental.socket", | 485 source_map_.RegisterSource("experimental.socket", |
| 482 IDR_EXPERIMENTAL_SOCKET_CUSTOM_BINDINGS_JS); | 486 IDR_EXPERIMENTAL_SOCKET_CUSTOM_BINDINGS_JS); |
| 483 source_map_.RegisterSource("extension", IDR_EXTENSION_CUSTOM_BINDINGS_JS); | 487 source_map_.RegisterSource("extension", IDR_EXTENSION_CUSTOM_BINDINGS_JS); |
| 484 source_map_.RegisterSource("fileBrowserHandler", | 488 source_map_.RegisterSource("fileBrowserHandler", |
| 485 IDR_FILE_BROWSER_HANDLER_CUSTOM_BINDINGS_JS); | 489 IDR_FILE_BROWSER_HANDLER_CUSTOM_BINDINGS_JS); |
| 486 source_map_.RegisterSource("fileBrowserPrivate", | 490 source_map_.RegisterSource("fileBrowserPrivate", |
| 487 IDR_FILE_BROWSER_PRIVATE_CUSTOM_BINDINGS_JS); | 491 IDR_FILE_BROWSER_PRIVATE_CUSTOM_BINDINGS_JS); |
| 488 source_map_.RegisterSource("i18n", IDR_I18N_CUSTOM_BINDINGS_JS); | 492 source_map_.RegisterSource("i18n", IDR_I18N_CUSTOM_BINDINGS_JS); |
| 489 source_map_.RegisterSource("input.ime", IDR_INPUT_IME_CUSTOM_BINDINGS_JS); | 493 source_map_.RegisterSource("input.ime", IDR_INPUT_IME_CUSTOM_BINDINGS_JS); |
| 494 source_map_.RegisterSource("experimental.mediaGalleries", | |
| 495 IDR_MEDIA_GALLERY_CUSTOM_BINDINGS_JS); | |
|
jstritar
2012/03/21 00:02:02
I think the rest of these are ordered alphabetical
vandebo (ex-Chrome)
2012/03/21 16:17:57
Oops, fixed. The first argument was introduced re
| |
| 490 source_map_.RegisterSource("omnibox", IDR_OMNIBOX_CUSTOM_BINDINGS_JS); | 496 source_map_.RegisterSource("omnibox", IDR_OMNIBOX_CUSTOM_BINDINGS_JS); |
| 491 source_map_.RegisterSource("pageActions", | 497 source_map_.RegisterSource("pageActions", |
| 492 IDR_PAGE_ACTIONS_CUSTOM_BINDINGS_JS); | 498 IDR_PAGE_ACTIONS_CUSTOM_BINDINGS_JS); |
| 493 source_map_.RegisterSource("pageAction", IDR_PAGE_ACTION_CUSTOM_BINDINGS_JS); | 499 source_map_.RegisterSource("pageAction", IDR_PAGE_ACTION_CUSTOM_BINDINGS_JS); |
| 494 source_map_.RegisterSource("pageCapture", | 500 source_map_.RegisterSource("pageCapture", |
| 495 IDR_PAGE_CAPTURE_CUSTOM_BINDINGS_JS); | 501 IDR_PAGE_CAPTURE_CUSTOM_BINDINGS_JS); |
| 496 source_map_.RegisterSource("storage", IDR_STORAGE_CUSTOM_BINDINGS_JS); | 502 source_map_.RegisterSource("storage", IDR_STORAGE_CUSTOM_BINDINGS_JS); |
| 497 source_map_.RegisterSource("tabs", IDR_TABS_CUSTOM_BINDINGS_JS); | 503 source_map_.RegisterSource("tabs", IDR_TABS_CUSTOM_BINDINGS_JS); |
| 498 source_map_.RegisterSource("tts", IDR_TTS_CUSTOM_BINDINGS_JS); | 504 source_map_.RegisterSource("tts", IDR_TTS_CUSTOM_BINDINGS_JS); |
| 499 source_map_.RegisterSource("ttsEngine", IDR_TTS_ENGINE_CUSTOM_BINDINGS_JS); | 505 source_map_.RegisterSource("ttsEngine", IDR_TTS_ENGINE_CUSTOM_BINDINGS_JS); |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 727 webrequest_adblock_ = adblock; | 733 webrequest_adblock_ = adblock; |
| 728 webrequest_adblock_plus_ = adblock_plus; | 734 webrequest_adblock_plus_ = adblock_plus; |
| 729 webrequest_other_ = other; | 735 webrequest_other_ = other; |
| 730 } | 736 } |
| 731 | 737 |
| 732 void ExtensionDispatcher::OnShouldClose(const std::string& extension_id, | 738 void ExtensionDispatcher::OnShouldClose(const std::string& extension_id, |
| 733 int sequence_id) { | 739 int sequence_id) { |
| 734 RenderThread::Get()->Send( | 740 RenderThread::Get()->Send( |
| 735 new ExtensionHostMsg_ShouldCloseAck(extension_id, sequence_id)); | 741 new ExtensionHostMsg_ShouldCloseAck(extension_id, sequence_id)); |
| 736 } | 742 } |
| OLD | NEW |