| OLD | NEW |
| 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 593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 604 bool DesktopWindowTreeHostWin::WidgetSizeIsClientSize() const { | 604 bool DesktopWindowTreeHostWin::WidgetSizeIsClientSize() const { |
| 605 const Widget* widget = GetWidget()->GetTopLevelWidget(); | 605 const Widget* widget = GetWidget()->GetTopLevelWidget(); |
| 606 return IsMaximized() || (widget && widget->ShouldUseNativeFrame()); | 606 return IsMaximized() || (widget && widget->ShouldUseNativeFrame()); |
| 607 } | 607 } |
| 608 | 608 |
| 609 bool DesktopWindowTreeHostWin::IsModal() const { | 609 bool DesktopWindowTreeHostWin::IsModal() const { |
| 610 return native_widget_delegate_->IsModal(); | 610 return native_widget_delegate_->IsModal(); |
| 611 } | 611 } |
| 612 | 612 |
| 613 int DesktopWindowTreeHostWin::GetInitialShowState() const { | 613 int DesktopWindowTreeHostWin::GetInitialShowState() const { |
| 614 return SW_SHOWNORMAL; | 614 return CanActivate() ? SW_SHOWNORMAL : SW_SHOWNOACTIVATE; |
| 615 } | 615 } |
| 616 | 616 |
| 617 bool DesktopWindowTreeHostWin::WillProcessWorkAreaChange() const { | 617 bool DesktopWindowTreeHostWin::WillProcessWorkAreaChange() const { |
| 618 return GetWidget()->widget_delegate()->WillProcessWorkAreaChange(); | 618 return GetWidget()->widget_delegate()->WillProcessWorkAreaChange(); |
| 619 } | 619 } |
| 620 | 620 |
| 621 int DesktopWindowTreeHostWin::GetNonClientComponent( | 621 int DesktopWindowTreeHostWin::GetNonClientComponent( |
| 622 const gfx::Point& point) const { | 622 const gfx::Point& point) const { |
| 623 gfx::Point dip_position = gfx::win::ScreenToDIPPoint(point); | 623 gfx::Point dip_position = gfx::win::ScreenToDIPPoint(point); |
| 624 return native_widget_delegate_->GetNonClientComponent(dip_position); | 624 return native_widget_delegate_->GetNonClientComponent(dip_position); |
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 958 | 958 |
| 959 // static | 959 // static |
| 960 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( | 960 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( |
| 961 internal::NativeWidgetDelegate* native_widget_delegate, | 961 internal::NativeWidgetDelegate* native_widget_delegate, |
| 962 DesktopNativeWidgetAura* desktop_native_widget_aura) { | 962 DesktopNativeWidgetAura* desktop_native_widget_aura) { |
| 963 return new DesktopWindowTreeHostWin(native_widget_delegate, | 963 return new DesktopWindowTreeHostWin(native_widget_delegate, |
| 964 desktop_native_widget_aura); | 964 desktop_native_widget_aura); |
| 965 } | 965 } |
| 966 | 966 |
| 967 } // namespace views | 967 } // namespace views |
| OLD | NEW |