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

Unified Diff: ui/views/controls/native/native_view_host.h

Issue 2654413002: Stretching NativeViewHost, and misc tab capture fixes.
Patch Set: Gettin' it all working on ui/cocoa and MacViews too. Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/compositor/layer.cc ('k') | ui/views/controls/native/native_view_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/native/native_view_host.h
diff --git a/ui/views/controls/native/native_view_host.h b/ui/views/controls/native/native_view_host.h
index 6b9aa0ea4ac56f99c96cd1880135240ca2802a19..9e3f730d7dedc710e7bd77b0d0f2fcbc5a507a3e 100644
--- a/ui/views/controls/native/native_view_host.h
+++ b/ui/views/controls/native/native_view_host.h
@@ -50,6 +50,12 @@ class VIEWS_EXPORT NativeViewHost : public View {
// Sets a preferred size for the native view attached to this View.
void SetPreferredSize(const gfx::Size& size);
+ // Sets a rendering size for the NativeView that may or may not match the size
+ // of this View. If the size does not match, scaling will occur. Pass an empty
+ // size to revert to the default behavior, where the NatieView's rendering
+ // size equals this View's size.
+ void SetRenderingSize(const gfx::Size& size);
+
// Fast resizing will move the native view and clip its visible region, this
// will result in white areas and will not resize the content (so scrollbars
// will be all wrong and content will flow offscreen). Only use this
@@ -113,6 +119,10 @@ class VIEWS_EXPORT NativeViewHost : public View {
// The preferred size of this View
gfx::Size preferred_size_;
+ // The rendering size of the NativeView, or an empty size if no scaling of the
+ // NativeView should occur.
+ gfx::Size rendering_size_;
+
// True if the native view is being resized using the fast method described
// in the setter/accessor above.
bool fast_resize_;
« no previous file with comments | « ui/compositor/layer.cc ('k') | ui/views/controls/native/native_view_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698