2018-09-14 05:02:16 +00:00
|
|
|
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
|
2018-09-14 18:03:43 +00:00
|
|
|
index cadeb2322620..3c5d1afbdfee 100644
|
2018-09-14 05:02:16 +00:00
|
|
|
--- a/ui/views/win/hwnd_message_handler.cc
|
|
|
|
+++ b/ui/views/win/hwnd_message_handler.cc
|
2018-09-14 18:03:43 +00:00
|
|
|
@@ -256,6 +256,10 @@ const int kSynthesizedMouseMessagesTimeDifference = 500;
|
|
|
|
|
2018-09-14 05:02:16 +00:00
|
|
|
} // namespace
|
2018-09-14 18:03:43 +00:00
|
|
|
|
2018-09-14 05:02:16 +00:00
|
|
|
+bool HWNDMessageHandlerDelegate::HasNativeFrame() const {
|
|
|
|
+ return false;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
// A scoping class that prevents a window from being able to redraw in response
|
|
|
|
// to invalidations that may occur within it for the lifetime of the object.
|
|
|
|
//
|
2018-09-14 18:03:43 +00:00
|
|
|
@@ -307,6 +311,7 @@ class HWNDMessageHandler::ScopedRedrawLock {
|
2018-09-14 05:02:16 +00:00
|
|
|
cancel_unlock_(false),
|
|
|
|
should_lock_(owner_->IsVisible() && !owner->HasChildRenderingWindow() &&
|
|
|
|
::IsWindow(hwnd_) &&
|
|
|
|
+ !owner_->HasNativeFrame() &&
|
|
|
|
(!(GetWindowLong(hwnd_, GWL_STYLE) & WS_CAPTION) ||
|
|
|
|
!ui::win::IsAeroGlassEnabled())) {
|
|
|
|
if (should_lock_)
|
2018-09-14 18:03:43 +00:00
|
|
|
@@ -898,6 +903,10 @@ bool HWNDMessageHandler::HasChildRenderingWindow() {
|
2018-09-14 05:02:16 +00:00
|
|
|
hwnd());
|
|
|
|
}
|
2018-09-14 18:03:43 +00:00
|
|
|
|
2018-09-14 05:02:16 +00:00
|
|
|
+bool HWNDMessageHandler::HasNativeFrame() {
|
|
|
|
+ return delegate_->HasNativeFrame();
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// HWNDMessageHandler, gfx::WindowImpl overrides:
|
2018-09-14 18:03:43 +00:00
|
|
|
|
2018-09-14 05:02:16 +00:00
|
|
|
diff --git a/ui/views/win/hwnd_message_handler.h b/ui/views/win/hwnd_message_handler.h
|
2018-09-14 18:03:43 +00:00
|
|
|
index 5afb32aa043c..3d17f29dff9a 100644
|
2018-09-14 05:02:16 +00:00
|
|
|
--- a/ui/views/win/hwnd_message_handler.h
|
|
|
|
+++ b/ui/views/win/hwnd_message_handler.h
|
2018-09-14 18:03:43 +00:00
|
|
|
@@ -177,6 +177,8 @@ class VIEWS_EXPORT HWNDMessageHandler : public gfx::WindowImpl,
|
2018-09-14 05:02:16 +00:00
|
|
|
typedef std::set<DWORD> TouchIDs;
|
|
|
|
enum class DwmFrameState { OFF, ON };
|
2018-09-14 18:03:43 +00:00
|
|
|
|
2018-09-14 05:02:16 +00:00
|
|
|
+ bool HasNativeFrame();
|
|
|
|
+
|
|
|
|
// Overridden from WindowImpl:
|
|
|
|
HICON GetDefaultWindowIcon() const override;
|
|
|
|
HICON GetSmallWindowIcon() const override;
|
|
|
|
diff --git a/ui/views/win/hwnd_message_handler_delegate.h b/ui/views/win/hwnd_message_handler_delegate.h
|
2018-09-14 18:03:43 +00:00
|
|
|
index 1b2d98a85738..dd080180aebd 100644
|
2018-09-14 05:02:16 +00:00
|
|
|
--- a/ui/views/win/hwnd_message_handler_delegate.h
|
|
|
|
+++ b/ui/views/win/hwnd_message_handler_delegate.h
|
|
|
|
@@ -46,6 +46,8 @@ class VIEWS_EXPORT HWNDMessageHandlerDelegate {
|
|
|
|
// True if the widget associated with this window has a non-client view.
|
|
|
|
virtual bool HasNonClientView() const = 0;
|
2018-09-14 18:03:43 +00:00
|
|
|
|
2018-09-14 05:02:16 +00:00
|
|
|
+ virtual bool HasNativeFrame() const;
|
|
|
|
+
|
|
|
|
// Returns who we want to be drawing the frame. Either the system (Windows)
|
|
|
|
// will handle it or Chrome will custom draw it.
|
|
|
|
virtual FrameMode GetFrameMode() const = 0;
|