Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(47)

Side by Side Diff: chrome/renderer/pepper_plugin_delegate_impl.cc

Issue 6625034: Clarify/fix fullscreen semantics, and add GetScreenSize (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix review comments Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/renderer/pepper_plugin_delegate_impl.h" 5 #include "chrome/renderer/pepper_plugin_delegate_impl.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "app/surface/transport_dib.h" 9 #include "app/surface/transport_dib.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 22 matching lines...) Expand all
33 #include "grit/locale_settings.h" 33 #include "grit/locale_settings.h"
34 #include "ipc/ipc_channel_handle.h" 34 #include "ipc/ipc_channel_handle.h"
35 #include "ppapi/c/dev/pp_video_dev.h" 35 #include "ppapi/c/dev/pp_video_dev.h"
36 #include "ppapi/c/pp_errors.h" 36 #include "ppapi/c/pp_errors.h"
37 #include "ppapi/c/private/ppb_flash.h" 37 #include "ppapi/c/private/ppb_flash.h"
38 #include "ppapi/c/private/ppb_flash_net_connector.h" 38 #include "ppapi/c/private/ppb_flash_net_connector.h"
39 #include "ppapi/proxy/host_dispatcher.h" 39 #include "ppapi/proxy/host_dispatcher.h"
40 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileChooserComplet ion.h" 40 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileChooserComplet ion.h"
41 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileChooserParams. h" 41 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileChooserParams. h"
42 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginContainer.h" 42 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginContainer.h"
43 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h"
43 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" 44 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
44 #include "ui/base/l10n/l10n_util.h" 45 #include "ui/base/l10n/l10n_util.h"
45 #include "ui/gfx/size.h" 46 #include "ui/gfx/size.h"
46 #include "webkit/fileapi/file_system_callback_dispatcher.h" 47 #include "webkit/fileapi/file_system_callback_dispatcher.h"
47 #include "webkit/glue/context_menu.h" 48 #include "webkit/glue/context_menu.h"
48 #include "webkit/plugins/npapi/webplugin.h" 49 #include "webkit/plugins/npapi/webplugin.h"
49 #include "webkit/plugins/ppapi/file_path.h" 50 #include "webkit/plugins/ppapi/file_path.h"
50 #include "webkit/plugins/ppapi/ppb_file_io_impl.h" 51 #include "webkit/plugins/ppapi/ppb_file_io_impl.h"
51 #include "webkit/plugins/ppapi/plugin_module.h" 52 #include "webkit/plugins/ppapi/plugin_module.h"
52 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" 53 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
(...skipping 807 matching lines...) Expand 10 before | Expand all | Expand 10 after
860 has_saved_context_menu_action_ = true; 861 has_saved_context_menu_action_ = true;
861 saved_context_menu_action_ = action; 862 saved_context_menu_action_ = action;
862 } 863 }
863 864
864 webkit::ppapi::FullscreenContainer* 865 webkit::ppapi::FullscreenContainer*
865 PepperPluginDelegateImpl::CreateFullscreenContainer( 866 PepperPluginDelegateImpl::CreateFullscreenContainer(
866 webkit::ppapi::PluginInstance* instance) { 867 webkit::ppapi::PluginInstance* instance) {
867 return render_view_->CreatePepperFullscreenContainer(instance); 868 return render_view_->CreatePepperFullscreenContainer(instance);
868 } 869 }
869 870
871 gfx::Size PepperPluginDelegateImpl::GetScreenSize() {
872 WebKit::WebScreenInfo info = render_view_->screenInfo();
873 return gfx::Size(info.rect.width, info.rect.height);
874 }
875
870 std::string PepperPluginDelegateImpl::GetDefaultEncoding() { 876 std::string PepperPluginDelegateImpl::GetDefaultEncoding() {
871 // TODO(brettw) bug 56615: Somehow get the preference for the default 877 // TODO(brettw) bug 56615: Somehow get the preference for the default
872 // encoding here rather than using the global default for the UI language. 878 // encoding here rather than using the global default for the UI language.
873 return l10n_util::GetStringUTF8(IDS_DEFAULT_ENCODING); 879 return l10n_util::GetStringUTF8(IDS_DEFAULT_ENCODING);
874 } 880 }
875 881
876 void PepperPluginDelegateImpl::ZoomLimitsChanged(double minimum_factor, 882 void PepperPluginDelegateImpl::ZoomLimitsChanged(double minimum_factor,
877 double maximum_factor) { 883 double maximum_factor) {
878 double minimum_level = WebView::zoomFactorToZoomLevel(minimum_factor); 884 double minimum_level = WebView::zoomFactorToZoomLevel(minimum_factor);
879 double maximum_level = WebView::zoomFactorToZoomLevel(maximum_factor); 885 double maximum_level = WebView::zoomFactorToZoomLevel(maximum_factor);
(...skipping 23 matching lines...) Expand all
903 } 909 }
904 910
905 void PepperPluginDelegateImpl::HasUnsupportedFeature() { 911 void PepperPluginDelegateImpl::HasUnsupportedFeature() {
906 render_view_->Send(new ViewHostMsg_PDFHasUnsupportedFeature( 912 render_view_->Send(new ViewHostMsg_PDFHasUnsupportedFeature(
907 render_view_->routing_id())); 913 render_view_->routing_id()));
908 } 914 }
909 915
910 P2PSocketDispatcher* PepperPluginDelegateImpl::GetP2PSocketDispatcher() { 916 P2PSocketDispatcher* PepperPluginDelegateImpl::GetP2PSocketDispatcher() {
911 return render_view_->p2p_socket_dispatcher(); 917 return render_view_->p2p_socket_dispatcher();
912 } 918 }
OLDNEW
« no previous file with comments | « chrome/renderer/pepper_plugin_delegate_impl.h ('k') | chrome/renderer/render_widget_fullscreen_pepper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698