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" | |
39 #include "third_party/WebKit/public/web/WebScopedUserGesture.h" | 38 #include "third_party/WebKit/public/web/WebScopedUserGesture.h" |
40 #include "third_party/WebKit/public/web/WebScopedWindowFocusAllowedIndicator.h" | 39 #include "third_party/WebKit/public/web/WebScopedWindowFocusAllowedIndicator.h" |
41 #include "third_party/WebKit/public/web/WebUserGestureIndicator.h" | 40 #include "third_party/WebKit/public/web/WebUserGestureIndicator.h" |
42 #include "v8/include/v8.h" | 41 #include "v8/include/v8.h" |
43 | 42 |
44 // Message passing API example (in a content script): | 43 // Message passing API example (in a content script): |
45 // var extension = | 44 // var extension = |
46 // new chrome.Extension('00123456789abcdef0123456789abcdef0123456'); | 45 // new chrome.Extension('00123456789abcdef0123456789abcdef0123456'); |
47 // var port = runtime.connect(); | 46 // var port = runtime.connect(); |
48 // port.postMessage('Can you hear me now?'); | 47 // port.postMessage('Can you hear me now?'); |
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
483 const ScriptContextSet& context_set, | 482 const ScriptContextSet& context_set, |
484 int port_id, | 483 int port_id, |
485 const std::string& error_message, | 484 const std::string& error_message, |
486 content::RenderFrame* restrict_to_render_frame) { | 485 content::RenderFrame* restrict_to_render_frame) { |
487 context_set.ForEach( | 486 context_set.ForEach( |
488 restrict_to_render_frame, | 487 restrict_to_render_frame, |
489 base::Bind(&DispatchOnDisconnectToScriptContext, port_id, error_message)); | 488 base::Bind(&DispatchOnDisconnectToScriptContext, port_id, error_message)); |
490 } | 489 } |
491 | 490 |
492 } // namespace extensions | 491 } // namespace extensions |
OLD | NEW |