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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc

Issue 583603004: Add CanMinimize to classes that implement WidgetDelegate::CanMaximize. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@win_resizable
Patch Set: Add TODO. Created 6 years, 2 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
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 "ui/views/widget/desktop_aura/desktop_window_tree_host_win.h" 5 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_win.h"
6 6
7 #include "base/win/metro.h" 7 #include "base/win/metro.h"
8 #include "third_party/skia/include/core/SkPath.h" 8 #include "third_party/skia/include/core/SkPath.h"
9 #include "third_party/skia/include/core/SkRegion.h" 9 #include "third_party/skia/include/core/SkRegion.h"
10 #include "ui/aura/client/aura_constants.h" 10 #include "ui/aura/client/aura_constants.h"
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 } 600 }
601 601
602 bool DesktopWindowTreeHostWin::CanResize() const { 602 bool DesktopWindowTreeHostWin::CanResize() const {
603 return GetWidget()->widget_delegate()->CanResize(); 603 return GetWidget()->widget_delegate()->CanResize();
604 } 604 }
605 605
606 bool DesktopWindowTreeHostWin::CanMaximize() const { 606 bool DesktopWindowTreeHostWin::CanMaximize() const {
607 return GetWidget()->widget_delegate()->CanMaximize(); 607 return GetWidget()->widget_delegate()->CanMaximize();
608 } 608 }
609 609
610 bool DesktopWindowTreeHostWin::CanMinimize() const {
611 return GetWidget()->widget_delegate()->CanMinimize();
612 }
613
610 bool DesktopWindowTreeHostWin::CanActivate() const { 614 bool DesktopWindowTreeHostWin::CanActivate() const {
611 if (IsModalWindowActive()) 615 if (IsModalWindowActive())
612 return true; 616 return true;
613 return native_widget_delegate_->CanActivate(); 617 return native_widget_delegate_->CanActivate();
614 } 618 }
615 619
616 bool DesktopWindowTreeHostWin::WidgetSizeIsClientSize() const { 620 bool DesktopWindowTreeHostWin::WidgetSizeIsClientSize() const {
617 const Widget* widget = GetWidget()->GetTopLevelWidget(); 621 const Widget* widget = GetWidget()->GetTopLevelWidget();
618 return IsMaximized() || (widget && widget->ShouldUseNativeFrame()); 622 return IsMaximized() || (widget && widget->ShouldUseNativeFrame());
619 } 623 }
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
991 995
992 // static 996 // static
993 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( 997 DesktopWindowTreeHost* DesktopWindowTreeHost::Create(
994 internal::NativeWidgetDelegate* native_widget_delegate, 998 internal::NativeWidgetDelegate* native_widget_delegate,
995 DesktopNativeWidgetAura* desktop_native_widget_aura) { 999 DesktopNativeWidgetAura* desktop_native_widget_aura) {
996 return new DesktopWindowTreeHostWin(native_widget_delegate, 1000 return new DesktopWindowTreeHostWin(native_widget_delegate,
997 desktop_native_widget_aura); 1001 desktop_native_widget_aura);
998 } 1002 }
999 1003
1000 } // namespace views 1004 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_window_tree_host_win.h ('k') | ui/views/widget/native_widget_aura_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698