| 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_helper.h" | 5 #include "chrome/renderer/extensions/extension_helper.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/json/json_string_value_serializer.h" | 10 #include "base/json/json_string_value_serializer.h" |
| 11 #include "base/lazy_instance.h" | 11 #include "base/lazy_instance.h" |
| 12 #include "base/message_loop/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
| 13 #include "base/strings/utf_string_conversions.h" | 13 #include "base/strings/utf_string_conversions.h" |
| 14 #include "chrome/common/chrome_switches.h" | 14 #include "chrome/common/chrome_switches.h" |
| 15 #include "chrome/common/extensions/chrome_extension_messages.h" | 15 #include "chrome/common/extensions/chrome_extension_messages.h" |
| 16 #include "chrome/common/render_messages.h" | 16 #include "chrome/common/render_messages.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/console.h" | |
| 20 #include "chrome/renderer/extensions/dispatcher.h" | 19 #include "chrome/renderer/extensions/dispatcher.h" |
| 21 #include "chrome/renderer/extensions/messaging_bindings.h" | 20 #include "chrome/renderer/extensions/messaging_bindings.h" |
| 22 #include "chrome/renderer/extensions/user_script_scheduler.h" | 21 #include "chrome/renderer/extensions/user_script_scheduler.h" |
| 23 #include "chrome/renderer/extensions/user_script_slave.h" | 22 #include "chrome/renderer/extensions/user_script_slave.h" |
| 24 #include "chrome/renderer/web_apps.h" | 23 #include "chrome/renderer/web_apps.h" |
| 25 #include "content/public/renderer/render_view.h" | 24 #include "content/public/renderer/render_view.h" |
| 26 #include "content/public/renderer/render_view_visitor.h" | 25 #include "content/public/renderer/render_view_visitor.h" |
| 27 #include "extensions/common/api/messaging/message.h" | 26 #include "extensions/common/api/messaging/message.h" |
| 28 #include "extensions/common/constants.h" | 27 #include "extensions/common/constants.h" |
| 29 #include "extensions/common/extension_messages.h" | 28 #include "extensions/common/extension_messages.h" |
| 29 #include "extensions/renderer/console.h" |
| 30 #include "third_party/WebKit/public/platform/WebURLRequest.h" | 30 #include "third_party/WebKit/public/platform/WebURLRequest.h" |
| 31 #include "third_party/WebKit/public/web/WebConsoleMessage.h" | 31 #include "third_party/WebKit/public/web/WebConsoleMessage.h" |
| 32 #include "third_party/WebKit/public/web/WebDocument.h" | 32 #include "third_party/WebKit/public/web/WebDocument.h" |
| 33 #include "third_party/WebKit/public/web/WebFrame.h" | 33 #include "third_party/WebKit/public/web/WebFrame.h" |
| 34 #include "third_party/WebKit/public/web/WebScopedUserGesture.h" | 34 #include "third_party/WebKit/public/web/WebScopedUserGesture.h" |
| 35 #include "third_party/WebKit/public/web/WebView.h" | 35 #include "third_party/WebKit/public/web/WebView.h" |
| 36 | 36 |
| 37 using content::ConsoleMessageLevel; | 37 using content::ConsoleMessageLevel; |
| 38 using blink::WebConsoleMessage; | 38 using blink::WebConsoleMessage; |
| 39 using blink::WebDataSource; | 39 using blink::WebDataSource; |
| (...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 render_view()->GetWebView()->mainFrame()->mainWorldScriptContext(); | 372 render_view()->GetWebView()->mainFrame()->mainWorldScriptContext(); |
| 373 ChromeV8Context* chrome_v8_context = | 373 ChromeV8Context* chrome_v8_context = |
| 374 dispatcher_->v8_context_set().GetByV8Context(script_context); | 374 dispatcher_->v8_context_set().GetByV8Context(script_context); |
| 375 if (!chrome_v8_context) | 375 if (!chrome_v8_context) |
| 376 return; | 376 return; |
| 377 chrome_v8_context->module_system()->CallModuleMethod( | 377 chrome_v8_context->module_system()->CallModuleMethod( |
| 378 "app.window", "onAppWindowClosed"); | 378 "app.window", "onAppWindowClosed"); |
| 379 } | 379 } |
| 380 | 380 |
| 381 } // namespace extensions | 381 } // namespace extensions |
| OLD | NEW |