Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "extensions/browser/app_window/app_window.h" | 5 #include "extensions/browser/app_window/app_window.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 596 SetNativeWindowFullscreen(); | 596 SetNativeWindowFullscreen(); |
| 597 } else { | 597 } else { |
| 598 GetBaseWindow()->Restore(); | 598 GetBaseWindow()->Restore(); |
| 599 } | 599 } |
| 600 } | 600 } |
| 601 | 601 |
| 602 void AppWindow::OSFullscreen() { | 602 void AppWindow::OSFullscreen() { |
| 603 SetFullscreen(FULLSCREEN_TYPE_OS, true); | 603 SetFullscreen(FULLSCREEN_TYPE_OS, true); |
| 604 } | 604 } |
| 605 | 605 |
| 606 void AppWindow::UpdateOSFullscreenState(bool is_fullscreen) { | |
| 607 if (is_fullscreen) { | |
| 608 fullscreen_types_ |= FULLSCREEN_TYPE_OS; | |
|
tapted
2015/06/09 06:04:01
why not just `=`? i.e. shouldn't this override any
jackhou1
2015/06/10 05:06:03
Yes, but the way it works now in patch set 5 means
| |
| 609 } else { | |
| 610 fullscreen_types_ = FULLSCREEN_TYPE_NONE; | |
| 611 SetNativeWindowFullscreen(); | |
|
tapted
2015/06/09 06:04:01
Is this still needed?
jackhou1
2015/06/10 05:06:03
It's needed to set the always-on-top state. But th
| |
| 612 } | |
| 613 | |
| 614 OnNativeWindowChanged(); | |
|
tapted
2015/06/09 06:04:01
What about just rolling the fullscreen check into
jackhou1
2015/06/10 05:06:03
Done.
| |
| 615 } | |
| 616 | |
| 606 void AppWindow::ForcedFullscreen() { | 617 void AppWindow::ForcedFullscreen() { |
| 607 SetFullscreen(FULLSCREEN_TYPE_FORCED, true); | 618 SetFullscreen(FULLSCREEN_TYPE_FORCED, true); |
| 608 } | 619 } |
| 609 | 620 |
| 610 void AppWindow::SetContentSizeConstraints(const gfx::Size& min_size, | 621 void AppWindow::SetContentSizeConstraints(const gfx::Size& min_size, |
| 611 const gfx::Size& max_size) { | 622 const gfx::Size& max_size) { |
| 612 SizeConstraints constraints(min_size, max_size); | 623 SizeConstraints constraints(min_size, max_size); |
| 613 native_app_window_->SetContentSizeConstraints(constraints.GetMinimumSize(), | 624 native_app_window_->SetContentSizeConstraints(constraints.GetMinimumSize(), |
| 614 constraints.GetMaximumSize()); | 625 constraints.GetMaximumSize()); |
| 615 | 626 |
| (...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1061 region.bounds.x(), | 1072 region.bounds.x(), |
| 1062 region.bounds.y(), | 1073 region.bounds.y(), |
| 1063 region.bounds.right(), | 1074 region.bounds.right(), |
| 1064 region.bounds.bottom(), | 1075 region.bounds.bottom(), |
| 1065 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); | 1076 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); |
| 1066 } | 1077 } |
| 1067 return sk_region; | 1078 return sk_region; |
| 1068 } | 1079 } |
| 1069 | 1080 |
| 1070 } // namespace extensions | 1081 } // namespace extensions |
| OLD | NEW |