Index: views/window/window.cc |
=================================================================== |
--- views/window/window.cc (revision 85647) |
+++ views/window/window.cc (working copy) |
@@ -37,7 +37,8 @@ |
saved_maximized_state_(false), |
minimum_size_(100, 100), |
disable_inactive_rendering_(false), |
- window_closed_(false) { |
+ window_closed_(false), |
+ frame_type_(FRAME_TYPE_DEFAULT) { |
} |
Window::~Window() { |
@@ -238,9 +239,22 @@ |
} |
bool Window::ShouldUseNativeFrame() const { |
+ if (frame_type_ != FRAME_TYPE_DEFAULT) |
+ return frame_type_ == FRAME_TYPE_FORCE_NATIVE; |
return native_window_->ShouldUseNativeFrame(); |
} |
+void Window::DebugToggleFrameType() { |
+ if (frame_type_ == FRAME_TYPE_DEFAULT) { |
+ frame_type_ = ShouldUseNativeFrame() ? FRAME_TYPE_FORCE_CUSTOM : |
+ FRAME_TYPE_FORCE_NATIVE; |
+ } else { |
+ frame_type_ = frame_type_ == FRAME_TYPE_FORCE_CUSTOM ? |
+ FRAME_TYPE_FORCE_NATIVE : FRAME_TYPE_FORCE_CUSTOM; |
+ } |
+ FrameTypeChanged(); |
+} |
+ |
void Window::FrameTypeChanged() { |
native_window_->FrameTypeChanged(); |
} |
@@ -269,10 +283,6 @@ |
return !!window_delegate_->AsDialogDelegate(); |
} |
-bool Window::IsUsingNativeFrame() const { |
- return non_client_view_->UseNativeFrame(); |
-} |
- |
gfx::Size Window::GetMinimumSize() const { |
return non_client_view_->GetMinimumSize(); |
} |