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

Side by Side Diff: chrome/browser/ui/views/apps/chrome_native_app_window_views_mac.mm

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: Don't remove ChromeNativeAppWindowViews::is_fullscreen_ 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
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 #import "chrome/browser/ui/views/apps/chrome_native_app_window_views_mac.h" 5 #import "chrome/browser/ui/views/apps/chrome_native_app_window_views_mac.h"
6 6
7 #include "chrome/browser/apps/app_shim/extension_app_shim_handler_mac.h" 7 #include "chrome/browser/apps/app_shim/extension_app_shim_handler_mac.h"
8 #include "chrome/browser/ui/views/apps/app_window_native_widget_mac.h" 8 #include "chrome/browser/ui/views/apps/app_window_native_widget_mac.h"
9 #include "chrome/browser/ui/views/apps/native_app_window_frame_view_mac.h" 9 #include "chrome/browser/ui/views/apps/native_app_window_frame_view_mac.h"
10 10
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 UnhideWithoutActivation(); 52 UnhideWithoutActivation();
53 ChromeNativeAppWindowViews::Activate(); 53 ChromeNativeAppWindowViews::Activate();
54 } 54 }
55 55
56 void ChromeNativeAppWindowViewsMac::FlashFrame(bool flash) { 56 void ChromeNativeAppWindowViewsMac::FlashFrame(bool flash) {
57 apps::ExtensionAppShimHandler::RequestUserAttentionForWindow( 57 apps::ExtensionAppShimHandler::RequestUserAttentionForWindow(
58 app_window(), flash ? apps::APP_SHIM_ATTENTION_CRITICAL 58 app_window(), flash ? apps::APP_SHIM_ATTENTION_CRITICAL
59 : apps::APP_SHIM_ATTENTION_CANCEL); 59 : apps::APP_SHIM_ATTENTION_CANCEL);
60 } 60 }
61 61
62 void ChromeNativeAppWindowViewsMac::OnWidgetBoundsChanged(
63 views::Widget* widget,
64 const gfx::Rect& new_bounds) {
65 app_window()->UpdateOSFullscreenState(IsFullscreen());
66 }
67
62 void ChromeNativeAppWindowViewsMac::ShowWithApp() { 68 void ChromeNativeAppWindowViewsMac::ShowWithApp() {
63 is_hidden_with_app_ = false; 69 is_hidden_with_app_ = false;
64 if (!app_window()->is_hidden()) 70 if (!app_window()->is_hidden())
65 ShowInactive(); 71 ShowInactive();
66 } 72 }
67 73
68 void ChromeNativeAppWindowViewsMac::HideWithApp() { 74 void ChromeNativeAppWindowViewsMac::HideWithApp() {
69 is_hidden_with_app_ = true; 75 is_hidden_with_app_ = true;
70 ChromeNativeAppWindowViews::Hide(); 76 ChromeNativeAppWindowViews::Hide();
71 } 77 }
72 78
73 void ChromeNativeAppWindowViewsMac::UnhideWithoutActivation() { 79 void ChromeNativeAppWindowViewsMac::UnhideWithoutActivation() {
74 if (is_hidden_with_app_) { 80 if (is_hidden_with_app_) {
75 apps::ExtensionAppShimHandler::UnhideWithoutActivationForWindow( 81 apps::ExtensionAppShimHandler::UnhideWithoutActivationForWindow(
76 app_window()); 82 app_window());
77 is_hidden_with_app_ = false; 83 is_hidden_with_app_ = false;
78 } 84 }
79 } 85 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698