diff options
Diffstat (limited to 'chrome/renderer/pepper_plugin_delegate_impl.cc')
-rw-r--r-- | chrome/renderer/pepper_plugin_delegate_impl.cc | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/chrome/renderer/pepper_plugin_delegate_impl.cc b/chrome/renderer/pepper_plugin_delegate_impl.cc index e633a64..426c15a 100644 --- a/chrome/renderer/pepper_plugin_delegate_impl.cc +++ b/chrome/renderer/pepper_plugin_delegate_impl.cc @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <cmath> + #include "chrome/renderer/pepper_plugin_delegate_impl.h" #include "app/l10n_util.h" @@ -25,6 +27,7 @@ #include "third_party/WebKit/WebKit/chromium/public/WebFileChooserCompletion.h" #include "third_party/WebKit/WebKit/chromium/public/WebFileChooserParams.h" #include "third_party/WebKit/WebKit/chromium/public/WebPluginContainer.h" +#include "third_party/WebKit/WebKit/chromium/public/WebView.h" #include "webkit/fileapi/file_system_callback_dispatcher.h" #include "webkit/glue/plugins/pepper_file_io.h" #include "webkit/glue/plugins/pepper_plugin_instance.h" @@ -35,6 +38,8 @@ #include "chrome/renderer/render_thread.h" #endif +using WebKit::WebView; + namespace { const int32 kDefaultCommandBufferSize = 1024 * 1024; @@ -612,14 +617,14 @@ PepperPluginDelegateImpl::CreateVideoDecoder( return decoder.release(); } -void PepperPluginDelegateImpl::DidChangeNumberOfFindResults(int identifier, - int total, - bool final_result) { +void PepperPluginDelegateImpl::NumberOfFindResultsChanged(int identifier, + int total, + bool final_result) { render_view_->reportFindInPageMatchCount(identifier, total, final_result); } -void PepperPluginDelegateImpl::DidChangeSelectedFindResult(int identifier, - int index) { +void PepperPluginDelegateImpl::SelectedFindResultChanged(int identifier, + int index) { render_view_->reportFindInPageSelection( identifier, index + 1, WebKit::WebRect()); } @@ -734,3 +739,12 @@ std::string PepperPluginDelegateImpl::GetDefaultEncoding() { // encoding here rather than using the global default for the UI language. return l10n_util::GetStringUTF8(IDS_DEFAULT_ENCODING); } + +void PepperPluginDelegateImpl::ZoomLimitsChanged(double minimum_factor, + double maximum_factor) { +#ifdef ZOOM_LEVEL_IS_DOUBLE + double minimum_level = WebView::zoomFactorToZoomLevel(minimum_factor); + double maximum_level = WebView::zoomFactorToZoomLevel(maximum_factor); + render_view_->webview()->zoomLimitsChanged(minimum_level, maximum_level); +#endif +} |