| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "components/plugins/renderer/plugin_placeholder.h" | 5 #include "components/plugins/renderer/plugin_placeholder.h" |
| 6 | 6 |
| 7 #include "base/strings/string_util.h" | 7 #include "base/strings/string_util.h" |
| 8 #include "content/public/common/web_preferences.h" | 8 #include "content/public/common/web_preferences.h" |
| 9 #include "content/public/renderer/render_frame.h" | 9 #include "content/public/renderer/render_frame.h" |
| 10 #include "content/public/renderer/render_thread.h" | 10 #include "content/public/renderer/render_thread.h" |
| 11 #include "gin/object_template_builder.h" | 11 #include "gin/object_template_builder.h" |
| 12 #include "third_party/WebKit/public/web/WebElement.h" | 12 #include "third_party/WebKit/public/web/WebElement.h" |
| 13 #include "third_party/WebKit/public/web/WebPluginContainer.h" | 13 #include "third_party/WebKit/public/web/WebPluginContainer.h" |
| 14 #include "third_party/re2/re2/re2.h" | 14 #include "third_party/re2/src/re2/re2.h" |
| 15 | 15 |
| 16 namespace plugins { | 16 namespace plugins { |
| 17 | 17 |
| 18 // The placeholder is loaded in normal web renderer processes, so it should not | 18 // The placeholder is loaded in normal web renderer processes, so it should not |
| 19 // have a chrome:// scheme that might let it be confused with a WebUI page. | 19 // have a chrome:// scheme that might let it be confused with a WebUI page. |
| 20 const char kPluginPlaceholderDataURL[] = "data:text/html,pluginplaceholderdata"; | 20 const char kPluginPlaceholderDataURL[] = "data:text/html,pluginplaceholderdata"; |
| 21 | 21 |
| 22 PluginPlaceholderBase::PluginPlaceholderBase( | 22 PluginPlaceholderBase::PluginPlaceholderBase( |
| 23 content::RenderFrame* render_frame, | 23 content::RenderFrame* render_frame, |
| 24 blink::WebLocalFrame* frame, | 24 blink::WebLocalFrame* frame, |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 } | 139 } |
| 140 | 140 |
| 141 gin::ObjectTemplateBuilder PluginPlaceholder::GetObjectTemplateBuilder( | 141 gin::ObjectTemplateBuilder PluginPlaceholder::GetObjectTemplateBuilder( |
| 142 v8::Isolate* isolate) { | 142 v8::Isolate* isolate) { |
| 143 return gin::Wrappable<PluginPlaceholder>::GetObjectTemplateBuilder(isolate) | 143 return gin::Wrappable<PluginPlaceholder>::GetObjectTemplateBuilder(isolate) |
| 144 .SetMethod<void (plugins::PluginPlaceholder::*)()>( | 144 .SetMethod<void (plugins::PluginPlaceholder::*)()>( |
| 145 "hide", &PluginPlaceholder::HideCallback); | 145 "hide", &PluginPlaceholder::HideCallback); |
| 146 } | 146 } |
| 147 | 147 |
| 148 } // namespace plugins | 148 } // namespace plugins |
| OLD | NEW |