| 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 "content/renderer/render_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 #include "third_party/WebKit/public/web/WebColorSuggestion.h" | 128 #include "third_party/WebKit/public/web/WebColorSuggestion.h" |
| 129 #include "third_party/WebKit/public/web/WebDocument.h" | 129 #include "third_party/WebKit/public/web/WebDocument.h" |
| 130 #include "third_party/WebKit/public/web/WebFrameWidget.h" | 130 #include "third_party/WebKit/public/web/WebFrameWidget.h" |
| 131 #include "third_party/WebKit/public/web/WebGlyphCache.h" | 131 #include "third_party/WebKit/public/web/WebGlyphCache.h" |
| 132 #include "third_party/WebKit/public/web/WebKit.h" | 132 #include "third_party/WebKit/public/web/WebKit.h" |
| 133 #include "third_party/WebKit/public/web/WebLocalFrame.h" | 133 #include "third_party/WebKit/public/web/WebLocalFrame.h" |
| 134 #include "third_party/WebKit/public/web/WebMediaStreamRegistry.h" | 134 #include "third_party/WebKit/public/web/WebMediaStreamRegistry.h" |
| 135 #include "third_party/WebKit/public/web/WebNavigationPolicy.h" | 135 #include "third_party/WebKit/public/web/WebNavigationPolicy.h" |
| 136 #include "third_party/WebKit/public/web/WebPlugin.h" | 136 #include "third_party/WebKit/public/web/WebPlugin.h" |
| 137 #include "third_party/WebKit/public/web/WebPluginParams.h" | 137 #include "third_party/WebKit/public/web/WebPluginParams.h" |
| 138 #include "third_party/WebKit/public/web/WebPluginPlaceholder.h" |
| 138 #include "third_party/WebKit/public/web/WebRange.h" | 139 #include "third_party/WebKit/public/web/WebRange.h" |
| 139 #include "third_party/WebKit/public/web/WebScopedUserGesture.h" | 140 #include "third_party/WebKit/public/web/WebScopedUserGesture.h" |
| 140 #include "third_party/WebKit/public/web/WebScriptSource.h" | 141 #include "third_party/WebKit/public/web/WebScriptSource.h" |
| 141 #include "third_party/WebKit/public/web/WebSearchableFormData.h" | 142 #include "third_party/WebKit/public/web/WebSearchableFormData.h" |
| 142 #include "third_party/WebKit/public/web/WebSecurityOrigin.h" | 143 #include "third_party/WebKit/public/web/WebSecurityOrigin.h" |
| 143 #include "third_party/WebKit/public/web/WebSecurityPolicy.h" | 144 #include "third_party/WebKit/public/web/WebSecurityPolicy.h" |
| 144 #include "third_party/WebKit/public/web/WebSerializedScriptValue.h" | 145 #include "third_party/WebKit/public/web/WebSerializedScriptValue.h" |
| 145 #include "third_party/WebKit/public/web/WebSettings.h" | 146 #include "third_party/WebKit/public/web/WebSettings.h" |
| 146 #include "third_party/WebKit/public/web/WebSurroundingText.h" | 147 #include "third_party/WebKit/public/web/WebSurroundingText.h" |
| 147 #include "third_party/WebKit/public/web/WebUserGestureIndicator.h" | 148 #include "third_party/WebKit/public/web/WebUserGestureIndicator.h" |
| (...skipping 1803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1951 } | 1952 } |
| 1952 | 1953 |
| 1953 void RenderFrameImpl::AddMessageToConsole(ConsoleMessageLevel level, | 1954 void RenderFrameImpl::AddMessageToConsole(ConsoleMessageLevel level, |
| 1954 const std::string& message) { | 1955 const std::string& message) { |
| 1955 if (devtools_agent_) | 1956 if (devtools_agent_) |
| 1956 devtools_agent_->AddMessageToConsole(level, message); | 1957 devtools_agent_->AddMessageToConsole(level, message); |
| 1957 } | 1958 } |
| 1958 | 1959 |
| 1959 // blink::WebFrameClient implementation ---------------------------------------- | 1960 // blink::WebFrameClient implementation ---------------------------------------- |
| 1960 | 1961 |
| 1962 blink::WebPluginPlaceholder* RenderFrameImpl::createPluginPlaceholder( |
| 1963 blink::WebLocalFrame* frame, |
| 1964 const blink::WebPluginParams& params) { |
| 1965 DCHECK_EQ(frame_, frame); |
| 1966 return GetContentClient() |
| 1967 ->renderer() |
| 1968 ->CreatePluginPlaceholder(this, frame, params) |
| 1969 .release(); |
| 1970 } |
| 1971 |
| 1961 blink::WebPlugin* RenderFrameImpl::createPlugin( | 1972 blink::WebPlugin* RenderFrameImpl::createPlugin( |
| 1962 blink::WebLocalFrame* frame, | 1973 blink::WebLocalFrame* frame, |
| 1963 const blink::WebPluginParams& params) { | 1974 const blink::WebPluginParams& params) { |
| 1964 DCHECK_EQ(frame_, frame); | 1975 DCHECK_EQ(frame_, frame); |
| 1965 blink::WebPlugin* plugin = NULL; | 1976 blink::WebPlugin* plugin = NULL; |
| 1966 if (GetContentClient()->renderer()->OverrideCreatePlugin( | 1977 if (GetContentClient()->renderer()->OverrideCreatePlugin( |
| 1967 this, frame, params, &plugin)) { | 1978 this, frame, params, &plugin)) { |
| 1968 return plugin; | 1979 return plugin; |
| 1969 } | 1980 } |
| 1970 | 1981 |
| (...skipping 3087 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5058 void RenderFrameImpl::RegisterMojoServices() { | 5069 void RenderFrameImpl::RegisterMojoServices() { |
| 5059 // Only main frame have ImageDownloader service. | 5070 // Only main frame have ImageDownloader service. |
| 5060 if (!frame_->parent()) { | 5071 if (!frame_->parent()) { |
| 5061 GetServiceRegistry()->AddService<image_downloader::ImageDownloader>( | 5072 GetServiceRegistry()->AddService<image_downloader::ImageDownloader>( |
| 5062 base::Bind(&ImageDownloaderImpl::CreateMojoService, | 5073 base::Bind(&ImageDownloaderImpl::CreateMojoService, |
| 5063 base::Unretained(this))); | 5074 base::Unretained(this))); |
| 5064 } | 5075 } |
| 5065 } | 5076 } |
| 5066 | 5077 |
| 5067 } // namespace content | 5078 } // namespace content |
| OLD | NEW |