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

Side by Side Diff: ui/views/mus/native_widget_mus.cc

Issue 2277563002: Wires up immersive mode for chrome and mash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: feedback Created 4 years, 4 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/mus/native_widget_mus.h" 5 #include "ui/views/mus/native_widget_mus.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 1065 matching lines...) Expand 10 before | Expand all | Expand 10 after
1076 1076
1077 void NativeWidgetMus::Restore() { 1077 void NativeWidgetMus::Restore() {
1078 SetShowState(ui::mojom::ShowState::NORMAL); 1078 SetShowState(ui::mojom::ShowState::NORMAL);
1079 } 1079 }
1080 1080
1081 void NativeWidgetMus::SetFullscreen(bool fullscreen) { 1081 void NativeWidgetMus::SetFullscreen(bool fullscreen) {
1082 if (IsFullscreen() == fullscreen) 1082 if (IsFullscreen() == fullscreen)
1083 return; 1083 return;
1084 if (fullscreen) { 1084 if (fullscreen) {
1085 show_state_before_fullscreen_ = GetShowState(window_); 1085 show_state_before_fullscreen_ = GetShowState(window_);
1086 // TODO(markdittmer): Fullscreen not implemented in ui::Window. 1086 SetShowState(ui::mojom::ShowState::FULLSCREEN);
1087 } else { 1087 } else {
1088 switch (show_state_before_fullscreen_) { 1088 switch (show_state_before_fullscreen_) {
1089 case ui::mojom::ShowState::MAXIMIZED: 1089 case ui::mojom::ShowState::MAXIMIZED:
1090 Maximize(); 1090 Maximize();
1091 break; 1091 break;
1092 case ui::mojom::ShowState::MINIMIZED: 1092 case ui::mojom::ShowState::MINIMIZED:
1093 Minimize(); 1093 Minimize();
1094 break; 1094 break;
1095 case ui::mojom::ShowState::DEFAULT: 1095 case ui::mojom::ShowState::DEFAULT:
1096 case ui::mojom::ShowState::NORMAL: 1096 case ui::mojom::ShowState::NORMAL:
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
1428 1428
1429 gfx::Path mask_path; 1429 gfx::Path mask_path;
1430 native_widget_delegate_->GetHitTestMask(&mask_path); 1430 native_widget_delegate_->GetHitTestMask(&mask_path);
1431 // TODO(jamescook): Use the full path for the mask. 1431 // TODO(jamescook): Use the full path for the mask.
1432 gfx::Rect mask_rect = 1432 gfx::Rect mask_rect =
1433 gfx::ToEnclosingRect(gfx::SkRectToRectF(mask_path.getBounds())); 1433 gfx::ToEnclosingRect(gfx::SkRectToRectF(mask_path.getBounds()));
1434 window_->SetHitTestMask(mask_rect); 1434 window_->SetHitTestMask(mask_rect);
1435 } 1435 }
1436 1436
1437 } // namespace views 1437 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698