| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "webkit/glue/plugins/pepper_webplugin_impl.h" | 5 #include "webkit/glue/plugins/pepper_webplugin_impl.h" |
| 6 | 6 |
| 7 #include "base/file_path.h" | 7 #include "base/file_path.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "third_party/ppapi/c/pp_var.h" | 9 #include "third_party/ppapi/c/pp_var.h" |
| 10 #include "third_party/WebKit/WebKit/chromium/public/WebPluginParams.h" | 10 #include "third_party/WebKit/WebKit/chromium/public/WebPluginParams.h" |
| 11 #include "third_party/WebKit/WebKit/chromium/public/WebRect.h" | 11 #include "third_party/WebKit/WebKit/chromium/public/WebRect.h" |
| 12 #include "webkit/glue/plugins/pepper_plugin_instance.h" | 12 #include "webkit/glue/plugins/pepper_plugin_instance.h" |
| 13 #include "webkit/glue/plugins/pepper_plugin_module.h" | 13 #include "webkit/glue/plugins/pepper_plugin_module.h" |
| 14 #include "webkit/glue/plugins/pepper_url_loader.h" | 14 #include "webkit/glue/plugins/pepper_url_loader.h" |
| 15 #include "webkit/glue/plugins/pepper_var.h" | 15 #include "webkit/glue/plugins/pepper_var.h" |
| 16 | 16 |
| 17 using WebKit::WebCanvas; | 17 using WebKit::WebCanvas; |
| 18 using WebKit::WebPluginContainer; | 18 using WebKit::WebPluginContainer; |
| 19 using WebKit::WebPluginParams; | 19 using WebKit::WebPluginParams; |
| 20 using WebKit::WebRect; | 20 using WebKit::WebRect; |
| 21 using WebKit::WebString; |
| 21 using WebKit::WebVector; | 22 using WebKit::WebVector; |
| 22 | 23 |
| 23 namespace pepper { | 24 namespace pepper { |
| 24 | 25 |
| 25 WebPluginImpl::WebPluginImpl( | 26 WebPluginImpl::WebPluginImpl( |
| 26 PluginModule* plugin_module, | 27 PluginModule* plugin_module, |
| 27 const WebPluginParams& params, | 28 const WebPluginParams& params, |
| 28 const base::WeakPtr<PluginDelegate>& plugin_delegate) | 29 const base::WeakPtr<PluginDelegate>& plugin_delegate) |
| 29 : init_data_(new InitData()), | 30 : init_data_(new InitData()), |
| 30 full_frame_(params.loadManually) { | 31 full_frame_(params.loadManually) { |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 void WebPluginImpl::didFinishLoadingFrameRequest(const WebKit::WebURL& url, | 138 void WebPluginImpl::didFinishLoadingFrameRequest(const WebKit::WebURL& url, |
| 138 void* notify_data) { | 139 void* notify_data) { |
| 139 } | 140 } |
| 140 | 141 |
| 141 void WebPluginImpl::didFailLoadingFrameRequest( | 142 void WebPluginImpl::didFailLoadingFrameRequest( |
| 142 const WebKit::WebURL& url, | 143 const WebKit::WebURL& url, |
| 143 void* notify_data, | 144 void* notify_data, |
| 144 const WebKit::WebURLError& error) { | 145 const WebKit::WebURLError& error) { |
| 145 } | 146 } |
| 146 | 147 |
| 148 bool WebPluginImpl::hasSelection() const { |
| 149 return !selectionAsText().isEmpty(); |
| 150 } |
| 151 |
| 152 WebKit::WebString WebPluginImpl::selectionAsText() const { |
| 153 return instance_->GetSelectedText(false); |
| 154 } |
| 155 |
| 156 WebKit::WebString WebPluginImpl::selectionAsMarkup() const { |
| 157 return instance_->GetSelectedText(true); |
| 158 } |
| 159 |
| 160 void WebPluginImpl::setZoomFactor(float scale, bool text_only) { |
| 161 instance_->Zoom(scale, text_only); |
| 162 } |
| 163 |
| 164 bool WebPluginImpl::supportsFind() { |
| 165 return instance_->SupportsFind(); |
| 166 } |
| 167 |
| 168 void WebPluginImpl::startFind(const WebString& search_text, |
| 169 bool case_sensitive, |
| 170 int identifier) { |
| 171 instance_->StartFind(search_text, case_sensitive, identifier); |
| 172 } |
| 173 |
| 174 void WebPluginImpl::selectFindResult(bool forward) { |
| 175 instance_->SelectFindResult(forward); |
| 176 } |
| 177 |
| 178 void WebPluginImpl::stopFind() { |
| 179 instance_->StopFind(); |
| 180 } |
| 181 |
| 147 } // namespace pepper | 182 } // namespace pepper |
| OLD | NEW |