| 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/webview_plugin.h" | 5 #include "components/plugins/renderer/webview_plugin.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 cursor = current_cursor_; | 248 cursor = current_cursor_; |
| 249 | 249 |
| 250 return handled; | 250 return handled; |
| 251 } | 251 } |
| 252 | 252 |
| 253 void WebViewPlugin::didReceiveResponse(const WebURLResponse& response) { | 253 void WebViewPlugin::didReceiveResponse(const WebURLResponse& response) { |
| 254 DCHECK(response_.isNull()); | 254 DCHECK(response_.isNull()); |
| 255 response_ = response; | 255 response_ = response; |
| 256 } | 256 } |
| 257 | 257 |
| 258 void WebViewPlugin::checkIfAudioSinkExistsAndIsAuthorized( |
| 259 const blink::WebString& sinkId, |
| 260 const blink::WebSecurityOrigin&, |
| 261 blink::WebSetSinkIdCallbacks*) { |
| 262 NOTREACHED(); |
| 263 } |
| 264 |
| 258 void WebViewPlugin::didReceiveData(const char* data, int data_length) { | 265 void WebViewPlugin::didReceiveData(const char* data, int data_length) { |
| 259 data_.push_back(std::string(data, data_length)); | 266 data_.push_back(std::string(data, data_length)); |
| 260 } | 267 } |
| 261 | 268 |
| 262 void WebViewPlugin::didFinishLoading() { | 269 void WebViewPlugin::didFinishLoading() { |
| 263 DCHECK(!finished_loading_); | 270 DCHECK(!finished_loading_); |
| 264 finished_loading_ = true; | 271 finished_loading_ = true; |
| 265 } | 272 } |
| 266 | 273 |
| 267 void WebViewPlugin::didFailLoading(const WebURLError& error) { | 274 void WebViewPlugin::didFailLoading(const WebURLError& error) { |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 // By default RenderViewObservers are destroyed along with the RenderView. | 347 // By default RenderViewObservers are destroyed along with the RenderView. |
| 341 // WebViewPlugin has a custom destruction mechanism, so we disable this. | 348 // WebViewPlugin has a custom destruction mechanism, so we disable this. |
| 342 } | 349 } |
| 343 | 350 |
| 344 void WebViewPlugin::OnZoomLevelChanged() { | 351 void WebViewPlugin::OnZoomLevelChanged() { |
| 345 if (container_) { | 352 if (container_) { |
| 346 web_view_->setZoomLevel( | 353 web_view_->setZoomLevel( |
| 347 blink::WebView::zoomFactorToZoomLevel(container_->pageZoomFactor())); | 354 blink::WebView::zoomFactorToZoomLevel(container_->pageZoomFactor())); |
| 348 } | 355 } |
| 349 } | 356 } |
| OLD | NEW |