| 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 <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 "components/guest_view/common/guest_view_constants.h" |
| 16 #include "content/public/child/v8_value_converter.h" | 17 #include "content/public/child/v8_value_converter.h" |
| 17 #include "content/public/common/child_process_host.h" | 18 #include "content/public/common/child_process_host.h" |
| 18 #include "content/public/renderer/render_frame.h" | 19 #include "content/public/renderer/render_frame.h" |
| 19 #include "content/public/renderer/render_thread.h" | 20 #include "content/public/renderer/render_thread.h" |
| 20 #include "extensions/common/api/messaging/message.h" | 21 #include "extensions/common/api/messaging/message.h" |
| 21 #include "extensions/common/extension_messages.h" | 22 #include "extensions/common/extension_messages.h" |
| 22 #include "extensions/common/guest_view/guest_view_constants.h" | |
| 23 #include "extensions/common/manifest_handlers/externally_connectable.h" | 23 #include "extensions/common/manifest_handlers/externally_connectable.h" |
| 24 #include "extensions/renderer/dispatcher.h" | 24 #include "extensions/renderer/dispatcher.h" |
| 25 #include "extensions/renderer/event_bindings.h" | 25 #include "extensions/renderer/event_bindings.h" |
| 26 #include "extensions/renderer/object_backed_native_handler.h" | 26 #include "extensions/renderer/object_backed_native_handler.h" |
| 27 #include "extensions/renderer/script_context.h" | 27 #include "extensions/renderer/script_context.h" |
| 28 #include "extensions/renderer/script_context_set.h" | 28 #include "extensions/renderer/script_context_set.h" |
| 29 #include "third_party/WebKit/public/web/WebDocument.h" | 29 #include "third_party/WebKit/public/web/WebDocument.h" |
| 30 #include "third_party/WebKit/public/web/WebLocalFrame.h" | 30 #include "third_party/WebKit/public/web/WebLocalFrame.h" |
| 31 #include "third_party/WebKit/public/web/WebScopedMicrotaskSuppression.h" | 31 #include "third_party/WebKit/public/web/WebScopedMicrotaskSuppression.h" |
| 32 #include "third_party/WebKit/public/web/WebScopedUserGesture.h" | 32 #include "third_party/WebKit/public/web/WebScopedUserGesture.h" |
| (...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 453 // TODO(robwu): ScriptContextSet.ForEach should accept RenderFrame*. | 453 // TODO(robwu): ScriptContextSet.ForEach should accept RenderFrame*. |
| 454 content::RenderView* restrict_to_render_view = | 454 content::RenderView* restrict_to_render_view = |
| 455 restrict_to_render_frame ? restrict_to_render_frame->GetRenderView() | 455 restrict_to_render_frame ? restrict_to_render_frame->GetRenderView() |
| 456 : NULL; | 456 : NULL; |
| 457 context_set.ForEach( | 457 context_set.ForEach( |
| 458 restrict_to_render_view, | 458 restrict_to_render_view, |
| 459 base::Bind(&DispatchOnDisconnectToScriptContext, port_id, error_message)); | 459 base::Bind(&DispatchOnDisconnectToScriptContext, port_id, error_message)); |
| 460 } | 460 } |
| 461 | 461 |
| 462 } // namespace extensions | 462 } // namespace extensions |
| OLD | NEW |