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

Unified Diff: ui/views/controls/native/native_view_host_mac.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
Index: ui/views/controls/native/native_view_host_mac.h
diff --git a/ui/views/controls/native/native_view_host_mac.h b/ui/views/controls/native/native_view_host_mac.h
index b47d1c2d441ae15ce20147f7ea1e758cf69cba84..376e1e515b15f6292c09f0572c3e61f207272f8b 100644
--- a/ui/views/controls/native/native_view_host_mac.h
+++ b/ui/views/controls/native/native_view_host_mac.h
@@ -10,6 +10,8 @@
#include "ui/views/controls/native/native_view_host_wrapper.h"
#include "ui/views/views_export.h"
+@class NativeViewHostMacScalingView;
+
namespace views {
class NativeViewHost;
@@ -28,7 +30,8 @@ class VIEWS_EXPORT NativeViewHostMac : public NativeViewHostWrapper {
void InstallClip(int x, int y, int w, int h) override;
bool HasInstalledClip() override;
void UninstallClip() override;
- void ShowWidget(int x, int y, int w, int h) override;
+ void ShowWidget(int x, int y, int w, int h, int render_w, int render_h)
+ override;
void HideWidget() override;
void SetFocus() override;
gfx::NativeViewAccessible GetNativeViewAccessible() override;
@@ -38,8 +41,10 @@ class VIEWS_EXPORT NativeViewHostMac : public NativeViewHostWrapper {
// Our associated NativeViewHost. Owns this.
NativeViewHost* host_;
- // Retain the native view as it may be destroyed at an unpredictable time.
- base::scoped_nsobject<NSView> native_view_;
+ // Set when AttachNativeView() is called. This provides a scaling transform
+ // when ShowWidget() is called with a rendering size not equal to the region's
+ // size. When NativeViewDetaching() is called, this is destroyed.
+ base::scoped_nsobject<NativeViewHostMacScalingView> scaling_view_;
DISALLOW_COPY_AND_ASSIGN(NativeViewHostMac);
};
« no previous file with comments | « ui/views/controls/native/native_view_host_aura_unittest.cc ('k') | ui/views/controls/native/native_view_host_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698