OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/pepper/pepper_plugin_delegate_impl.h" | 5 #include "content/renderer/pepper/pepper_plugin_delegate_impl.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 #include <cstddef> | 8 #include <cstddef> |
9 #include <map> | 9 #include <map> |
10 #include <queue> | 10 #include <queue> |
(...skipping 1345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1356 webkit::ppapi::PluginInstance* instance) { | 1356 webkit::ppapi::PluginInstance* instance) { |
1357 return render_view_->CreatePepperFullscreenContainer(instance); | 1357 return render_view_->CreatePepperFullscreenContainer(instance); |
1358 } | 1358 } |
1359 | 1359 |
1360 gfx::Size PepperPluginDelegateImpl::GetScreenSize() { | 1360 gfx::Size PepperPluginDelegateImpl::GetScreenSize() { |
1361 WebKit::WebScreenInfo info = render_view_->screenInfo(); | 1361 WebKit::WebScreenInfo info = render_view_->screenInfo(); |
1362 return gfx::Size(info.rect.width, info.rect.height); | 1362 return gfx::Size(info.rect.width, info.rect.height); |
1363 } | 1363 } |
1364 | 1364 |
1365 std::string PepperPluginDelegateImpl::GetDefaultEncoding() { | 1365 std::string PepperPluginDelegateImpl::GetDefaultEncoding() { |
1366 // TODO(brettw) bug 56615: Somehow get the preference for the default | 1366 return render_view_->webkit_preferences().default_encoding; |
1367 // encoding here rather than using the global default for the UI language. | |
1368 return GetContentClient()->renderer()->GetDefaultEncoding(); | |
1369 } | 1367 } |
1370 | 1368 |
1371 void PepperPluginDelegateImpl::ZoomLimitsChanged(double minimum_factor, | 1369 void PepperPluginDelegateImpl::ZoomLimitsChanged(double minimum_factor, |
1372 double maximum_factor) { | 1370 double maximum_factor) { |
1373 double minimum_level = WebView::zoomFactorToZoomLevel(minimum_factor); | 1371 double minimum_level = WebView::zoomFactorToZoomLevel(minimum_factor); |
1374 double maximum_level = WebView::zoomFactorToZoomLevel(maximum_factor); | 1372 double maximum_level = WebView::zoomFactorToZoomLevel(maximum_factor); |
1375 render_view_->webview()->zoomLimitsChanged(minimum_level, maximum_level); | 1373 render_view_->webview()->zoomLimitsChanged(minimum_level, maximum_level); |
1376 } | 1374 } |
1377 | 1375 |
1378 std::string PepperPluginDelegateImpl::ResolveProxy(const GURL& url) { | 1376 std::string PepperPluginDelegateImpl::ResolveProxy(const GURL& url) { |
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1799 else | 1797 else |
1800 return render_view_->mouse_lock_dispatcher(); | 1798 return render_view_->mouse_lock_dispatcher(); |
1801 } | 1799 } |
1802 | 1800 |
1803 webkit_glue::ClipboardClient* | 1801 webkit_glue::ClipboardClient* |
1804 PepperPluginDelegateImpl::CreateClipboardClient() const { | 1802 PepperPluginDelegateImpl::CreateClipboardClient() const { |
1805 return new RendererClipboardClient; | 1803 return new RendererClipboardClient; |
1806 } | 1804 } |
1807 | 1805 |
1808 } // namespace content | 1806 } // namespace content |
OLD | NEW |