| 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.h" | 12 #include "base/message_loop.h" |
| 13 #include "base/utf_string_conversions.h" | 13 #include "base/utf_string_conversions.h" |
| 14 #include "chrome/common/chrome_switches.h" | 14 #include "chrome/common/chrome_switches.h" |
| 15 #include "chrome/common/extensions/extension_messages.h" | 15 #include "chrome/common/extensions/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" | 19 #include "chrome/renderer/extensions/console.h" |
| 20 #include "chrome/renderer/extensions/dispatcher.h" | 20 #include "chrome/renderer/extensions/dispatcher.h" |
| 21 #include "chrome/renderer/extensions/miscellaneous_bindings.h" | 21 #include "chrome/renderer/extensions/miscellaneous_bindings.h" |
| 22 #include "chrome/renderer/extensions/user_script_scheduler.h" | 22 #include "chrome/renderer/extensions/user_script_scheduler.h" |
| 23 #include "chrome/renderer/extensions/user_script_slave.h" | 23 #include "chrome/renderer/extensions/user_script_slave.h" |
| 24 #include "chrome/renderer/web_apps.h" | 24 #include "chrome/renderer/web_apps.h" |
| 25 #include "content/public/renderer/render_view.h" | 25 #include "content/public/renderer/render_view.h" |
| 26 #include "content/public/renderer/render_view_visitor.h" | 26 #include "content/public/renderer/render_view_visitor.h" |
| 27 #include "extensions/common/constants.h" | 27 #include "extensions/common/constants.h" |
| 28 #include "third_party/WebKit/Source/Platform/chromium/public/WebURLRequest.h" | 28 #include "third_party/WebKit/public/platform/WebURLRequest.h" |
| 29 #include "third_party/WebKit/Source/WebKit/chromium/public/WebConsoleMessage.h" | 29 #include "third_party/WebKit/Source/WebKit/chromium/public/WebConsoleMessage.h" |
| 30 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" | 30 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" |
| 31 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" | 31 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" |
| 32 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScopedUserGesture.
h" | 32 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScopedUserGesture.
h" |
| 33 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" | 33 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
| 34 | 34 |
| 35 using content::ConsoleMessageLevel; | 35 using content::ConsoleMessageLevel; |
| 36 using WebKit::WebConsoleMessage; | 36 using WebKit::WebConsoleMessage; |
| 37 using WebKit::WebDataSource; | 37 using WebKit::WebDataSource; |
| 38 using WebKit::WebFrame; | 38 using WebKit::WebFrame; |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 v8::Handle<v8::Context> script_context = | 361 v8::Handle<v8::Context> script_context = |
| 362 render_view()->GetWebView()->mainFrame()->mainWorldScriptContext(); | 362 render_view()->GetWebView()->mainFrame()->mainWorldScriptContext(); |
| 363 ChromeV8Context* chrome_v8_context = | 363 ChromeV8Context* chrome_v8_context = |
| 364 dispatcher_->v8_context_set().GetByV8Context(script_context); | 364 dispatcher_->v8_context_set().GetByV8Context(script_context); |
| 365 if (!chrome_v8_context) | 365 if (!chrome_v8_context) |
| 366 return; | 366 return; |
| 367 chrome_v8_context->CallChromeHiddenMethod("OnAppWindowClosed", 0, NULL, NULL); | 367 chrome_v8_context->CallChromeHiddenMethod("OnAppWindowClosed", 0, NULL, NULL); |
| 368 } | 368 } |
| 369 | 369 |
| 370 } // namespace extensions | 370 } // namespace extensions |
| OLD | NEW |