OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "extensions/renderer/messaging_bindings.h" | 5 #include "extensions/renderer/messaging_bindings.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 17 matching lines...) Expand all Loading... |
28 #include "extensions/renderer/dispatcher.h" | 28 #include "extensions/renderer/dispatcher.h" |
29 #include "extensions/renderer/event_bindings.h" | 29 #include "extensions/renderer/event_bindings.h" |
30 #include "extensions/renderer/extension_frame_helper.h" | 30 #include "extensions/renderer/extension_frame_helper.h" |
31 #include "extensions/renderer/gc_callback.h" | 31 #include "extensions/renderer/gc_callback.h" |
32 #include "extensions/renderer/object_backed_native_handler.h" | 32 #include "extensions/renderer/object_backed_native_handler.h" |
33 #include "extensions/renderer/script_context.h" | 33 #include "extensions/renderer/script_context.h" |
34 #include "extensions/renderer/script_context_set.h" | 34 #include "extensions/renderer/script_context_set.h" |
35 #include "extensions/renderer/v8_helpers.h" | 35 #include "extensions/renderer/v8_helpers.h" |
36 #include "third_party/WebKit/public/web/WebDocument.h" | 36 #include "third_party/WebKit/public/web/WebDocument.h" |
37 #include "third_party/WebKit/public/web/WebLocalFrame.h" | 37 #include "third_party/WebKit/public/web/WebLocalFrame.h" |
| 38 #include "third_party/WebKit/public/web/WebScopedMicrotaskSuppression.h" |
38 #include "third_party/WebKit/public/web/WebScopedUserGesture.h" | 39 #include "third_party/WebKit/public/web/WebScopedUserGesture.h" |
39 #include "third_party/WebKit/public/web/WebScopedWindowFocusAllowedIndicator.h" | 40 #include "third_party/WebKit/public/web/WebScopedWindowFocusAllowedIndicator.h" |
40 #include "third_party/WebKit/public/web/WebUserGestureIndicator.h" | 41 #include "third_party/WebKit/public/web/WebUserGestureIndicator.h" |
41 #include "v8/include/v8.h" | 42 #include "v8/include/v8.h" |
42 | 43 |
43 // Message passing API example (in a content script): | 44 // Message passing API example (in a content script): |
44 // var extension = | 45 // var extension = |
45 // new chrome.Extension('00123456789abcdef0123456789abcdef0123456'); | 46 // new chrome.Extension('00123456789abcdef0123456789abcdef0123456'); |
46 // var port = runtime.connect(); | 47 // var port = runtime.connect(); |
47 // port.postMessage('Can you hear me now?'); | 48 // port.postMessage('Can you hear me now?'); |
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
482 const ScriptContextSet& context_set, | 483 const ScriptContextSet& context_set, |
483 int port_id, | 484 int port_id, |
484 const std::string& error_message, | 485 const std::string& error_message, |
485 content::RenderFrame* restrict_to_render_frame) { | 486 content::RenderFrame* restrict_to_render_frame) { |
486 context_set.ForEach( | 487 context_set.ForEach( |
487 restrict_to_render_frame, | 488 restrict_to_render_frame, |
488 base::Bind(&DispatchOnDisconnectToScriptContext, port_id, error_message)); | 489 base::Bind(&DispatchOnDisconnectToScriptContext, port_id, error_message)); |
489 } | 490 } |
490 | 491 |
491 } // namespace extensions | 492 } // namespace extensions |
OLD | NEW |