| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "content/renderer/web_ui_extension.h" | 5 #include "content/renderer/web_ui_extension.h" |
| 6 | 6 |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "base/values.h" | 8 #include "base/values.h" |
| 9 #include "content/common/view_messages.h" | 9 #include "content/common/view_messages.h" |
| 10 #include "content/public/child/v8_value_converter.h" | 10 #include "content/public/child/v8_value_converter.h" |
| 11 #include "content/public/common/bindings_policy.h" | 11 #include "content/public/common/bindings_policy.h" |
| 12 #include "content/public/common/url_constants.h" | 12 #include "content/public/common/url_constants.h" |
| 13 #include "content/public/renderer/chrome_object_extensions_utils.h" |
| 13 #include "content/public/renderer/render_thread.h" | 14 #include "content/public/renderer/render_thread.h" |
| 14 #include "content/public/renderer/render_view.h" | 15 #include "content/public/renderer/render_view.h" |
| 15 #include "content/renderer/chrome_object_extensions_utils.h" | |
| 16 #include "content/renderer/web_ui_extension_data.h" | 16 #include "content/renderer/web_ui_extension_data.h" |
| 17 #include "gin/arguments.h" | 17 #include "gin/arguments.h" |
| 18 #include "gin/function_template.h" | 18 #include "gin/function_template.h" |
| 19 #include "third_party/WebKit/public/web/WebDocument.h" | 19 #include "third_party/WebKit/public/web/WebDocument.h" |
| 20 #include "third_party/WebKit/public/web/WebKit.h" | 20 #include "third_party/WebKit/public/web/WebKit.h" |
| 21 #include "third_party/WebKit/public/web/WebLocalFrame.h" | 21 #include "third_party/WebKit/public/web/WebLocalFrame.h" |
| 22 #include "third_party/WebKit/public/web/WebView.h" | 22 #include "third_party/WebKit/public/web/WebView.h" |
| 23 #include "url/gurl.h" | 23 #include "url/gurl.h" |
| 24 #include "v8/include/v8.h" | 24 #include "v8/include/v8.h" |
| 25 | 25 |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 std::string WebUIExtension::GetVariableValue(const std::string& name) { | 127 std::string WebUIExtension::GetVariableValue(const std::string& name) { |
| 128 blink::WebFrame* frame; | 128 blink::WebFrame* frame; |
| 129 RenderView* render_view; | 129 RenderView* render_view; |
| 130 if (!ShouldRespondToRequest(&frame, &render_view)) | 130 if (!ShouldRespondToRequest(&frame, &render_view)) |
| 131 return std::string(); | 131 return std::string(); |
| 132 | 132 |
| 133 return WebUIExtensionData::Get(render_view)->GetValue(name); | 133 return WebUIExtensionData::Get(render_view)->GetValue(name); |
| 134 } | 134 } |
| 135 | 135 |
| 136 } // namespace content | 136 } // namespace content |
| OLD | NEW |