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

Side by Side Diff: extensions/browser/app_window/app_window.cc

Issue 1172483003: [MacViews] Update AppWindow when the native window changes fullscreen state. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@views
Patch Set: Address comments. Created 5 years, 6 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
« no previous file with comments | « chrome/browser/ui/cocoa/apps/native_app_window_cocoa_browsertest.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 WebContentsModalDialogManager* modal_dialog_manager = 447 WebContentsModalDialogManager* modal_dialog_manager =
448 WebContentsModalDialogManager::FromWebContents(web_contents()); 448 WebContentsModalDialogManager::FromWebContents(web_contents());
449 if (modal_dialog_manager) // May be null in unit tests. 449 if (modal_dialog_manager) // May be null in unit tests.
450 modal_dialog_manager->SetDelegate(nullptr); 450 modal_dialog_manager->SetDelegate(nullptr);
451 app_window_contents_->NativeWindowClosed(); 451 app_window_contents_->NativeWindowClosed();
452 } 452 }
453 delete this; 453 delete this;
454 } 454 }
455 455
456 void AppWindow::OnNativeWindowChanged() { 456 void AppWindow::OnNativeWindowChanged() {
457 #if defined(OS_MACOSX)
tapted 2015/06/10 05:45:25 before this, I'd just do if (!native_app_window
jackhou1 2015/06/10 07:52:32 Done.
458 // On Mac the user can change the window's fullscreen state. If that has
459 // happened, update AppWindow's internal state.
460 if (native_app_window_) {
461 bool native_is_fullscreen = native_app_window_->IsFullscreen();
462 bool was_fullscreen = IsFullscreen();
463 if (native_is_fullscreen)
464 fullscreen_types_ |= FULLSCREEN_TYPE_OS;
465 else
466 fullscreen_types_ = FULLSCREEN_TYPE_NONE;
467
468 if (native_is_fullscreen != was_fullscreen && cached_always_on_top_)
tapted 2015/06/10 05:45:25 I don't think the `native_is_fullscreen != was_ful
jackhou1 2015/06/10 07:52:32 Done.
469 UpdateNativeAlwaysOnTop(); // Same as in SetNativeWindowFullscreen.
470 }
471 #endif
472
457 SaveWindowPosition(); 473 SaveWindowPosition();
458 474
459 #if defined(OS_WIN) 475 #if defined(OS_WIN)
460 if (native_app_window_ && cached_always_on_top_ && !IsFullscreen() && 476 if (native_app_window_ && cached_always_on_top_ && !IsFullscreen() &&
461 !native_app_window_->IsMaximized() && 477 !native_app_window_->IsMaximized() &&
462 !native_app_window_->IsMinimized()) { 478 !native_app_window_->IsMinimized()) {
463 UpdateNativeAlwaysOnTop(); 479 UpdateNativeAlwaysOnTop();
464 } 480 }
465 #endif 481 #endif
466 482
(...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after
1061 region.bounds.x(), 1077 region.bounds.x(),
1062 region.bounds.y(), 1078 region.bounds.y(),
1063 region.bounds.right(), 1079 region.bounds.right(),
1064 region.bounds.bottom(), 1080 region.bounds.bottom(),
1065 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); 1081 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op);
1066 } 1082 }
1067 return sk_region; 1083 return sk_region;
1068 } 1084 }
1069 1085
1070 } // namespace extensions 1086 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/apps/native_app_window_cocoa_browsertest.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698