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

Side by Side Diff: webkit/plugins/ppapi/ppapi_plugin_instance.cc

Issue 10544168: Implement HiDPI support in Pepper dev interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 5 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
« no previous file with comments | « webkit/plugins/ppapi/plugin_module.cc ('k') | webkit/plugins/ppapi/ppb_graphics_2d_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "webkit/plugins/ppapi/ppapi_plugin_instance.h" 5 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/linked_ptr.h" 10 #include "base/memory/linked_ptr.h"
(...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after
743 // consistent since this is given to the plugin, so force everything to 0 743 // consistent since this is given to the plugin, so force everything to 0
744 // in the "everything is clipped" case. 744 // in the "everything is clipped" case.
745 gfx::Rect new_clip; 745 gfx::Rect new_clip;
746 if (!clip.IsEmpty()) 746 if (!clip.IsEmpty())
747 new_clip = clip; 747 new_clip = clip;
748 748
749 ViewData previous_view = view_data_; 749 ViewData previous_view = view_data_;
750 750
751 view_data_.rect = PP_FromGfxRect(position); 751 view_data_.rect = PP_FromGfxRect(position);
752 view_data_.clip_rect = PP_FromGfxRect(clip); 752 view_data_.clip_rect = PP_FromGfxRect(clip);
753 view_data_.device_scale = container_->deviceScaleFactor();
754 view_data_.css_scale = container_->pageZoomFactor() *
755 container_->pageScaleFactor();
753 756
754 if (desired_fullscreen_state_ || view_data_.is_fullscreen) { 757 if (desired_fullscreen_state_ || view_data_.is_fullscreen) {
755 WebElement element = container_->element(); 758 WebElement element = container_->element();
756 WebDocument document = element.document(); 759 WebDocument document = element.document();
757 bool is_fullscreen_element = (element == document.fullScreenElement()); 760 bool is_fullscreen_element = (element == document.fullScreenElement());
758 if (!view_data_.is_fullscreen && desired_fullscreen_state_ && 761 if (!view_data_.is_fullscreen && desired_fullscreen_state_ &&
759 delegate()->IsInFullscreenMode() && is_fullscreen_element) { 762 delegate()->IsInFullscreenMode() && is_fullscreen_element) {
760 // Entered fullscreen. Only possible via SetFullscreen(). 763 // Entered fullscreen. Only possible via SetFullscreen().
761 view_data_.is_fullscreen = true; 764 view_data_.is_fullscreen = true;
762 } else if (view_data_.is_fullscreen && !is_fullscreen_element) { 765 } else if (view_data_.is_fullscreen && !is_fullscreen_element) {
(...skipping 1447 matching lines...) Expand 10 before | Expand all | Expand 10 after
2210 screen_size_for_fullscreen_ = gfx::Size(); 2213 screen_size_for_fullscreen_ = gfx::Size();
2211 WebElement element = container_->element(); 2214 WebElement element = container_->element();
2212 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_); 2215 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_);
2213 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_); 2216 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_);
2214 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_); 2217 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_);
2215 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_); 2218 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_);
2216 } 2219 }
2217 2220
2218 } // namespace ppapi 2221 } // namespace ppapi
2219 } // namespace webkit 2222 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/plugin_module.cc ('k') | webkit/plugins/ppapi/ppb_graphics_2d_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698