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/messaging_bindings.h" | 5 #include "chrome/renderer/extensions/messaging_bindings.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/bind_helpers.h" | 12 #include "base/bind_helpers.h" |
13 #include "base/lazy_instance.h" | 13 #include "base/lazy_instance.h" |
14 #include "base/message_loop/message_loop.h" | 14 #include "base/message_loop/message_loop.h" |
15 #include "base/values.h" | 15 #include "base/values.h" |
16 #include "chrome/common/extensions/manifest_handlers/externally_connectable.h" | 16 #include "chrome/common/extensions/manifest_handlers/externally_connectable.h" |
17 #include "chrome/common/url_constants.h" | 17 #include "chrome/common/url_constants.h" |
18 #include "chrome/renderer/extensions/chrome_v8_context.h" | 18 #include "chrome/renderer/extensions/chrome_v8_context.h" |
19 #include "chrome/renderer/extensions/chrome_v8_context_set.h" | 19 #include "chrome/renderer/extensions/chrome_v8_context_set.h" |
20 #include "chrome/renderer/extensions/chrome_v8_extension.h" | 20 #include "chrome/renderer/extensions/chrome_v8_extension.h" |
21 #include "chrome/renderer/extensions/dispatcher.h" | 21 #include "chrome/renderer/extensions/dispatcher.h" |
22 #include "chrome/renderer/extensions/event_bindings.h" | |
23 #include "content/public/renderer/render_thread.h" | 22 #include "content/public/renderer/render_thread.h" |
24 #include "content/public/renderer/render_view.h" | 23 #include "content/public/renderer/render_view.h" |
25 #include "content/public/renderer/v8_value_converter.h" | 24 #include "content/public/renderer/v8_value_converter.h" |
26 #include "extensions/common/api/messaging/message.h" | 25 #include "extensions/common/api/messaging/message.h" |
27 #include "extensions/common/extension_messages.h" | 26 #include "extensions/common/extension_messages.h" |
| 27 #include "extensions/renderer/event_bindings.h" |
28 #include "extensions/renderer/scoped_persistent.h" | 28 #include "extensions/renderer/scoped_persistent.h" |
29 #include "grit/renderer_resources.h" | 29 #include "grit/renderer_resources.h" |
30 #include "third_party/WebKit/public/web/WebScopedMicrotaskSuppression.h" | 30 #include "third_party/WebKit/public/web/WebScopedMicrotaskSuppression.h" |
31 #include "third_party/WebKit/public/web/WebScopedUserGesture.h" | 31 #include "third_party/WebKit/public/web/WebScopedUserGesture.h" |
32 #include "third_party/WebKit/public/web/WebScopedWindowFocusAllowedIndicator.h" | 32 #include "third_party/WebKit/public/web/WebScopedWindowFocusAllowedIndicator.h" |
33 #include "third_party/WebKit/public/web/WebUserGestureIndicator.h" | 33 #include "third_party/WebKit/public/web/WebUserGestureIndicator.h" |
34 #include "v8/include/v8.h" | 34 #include "v8/include/v8.h" |
35 | 35 |
36 // Message passing API example (in a content script): | 36 // Message passing API example (in a content script): |
37 // var extension = | 37 // var extension = |
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
426 } else { | 426 } else { |
427 arguments.push_back(v8::Null(isolate)); | 427 arguments.push_back(v8::Null(isolate)); |
428 } | 428 } |
429 (*it)->module_system()->CallModuleMethod("messaging", | 429 (*it)->module_system()->CallModuleMethod("messaging", |
430 "dispatchOnDisconnect", | 430 "dispatchOnDisconnect", |
431 &arguments); | 431 &arguments); |
432 } | 432 } |
433 } | 433 } |
434 | 434 |
435 } // namespace extensions | 435 } // namespace extensions |
OLD | NEW |