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

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

Issue 851233002: [Win] Fix black screen when min/maximizing hidden app window. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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/views/apps/app_window_desktop_native_widget_aura_win.cc ('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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 AppWindowRegistry::Get(browser_context_)->AddAppWindow(this); 292 AppWindowRegistry::Get(browser_context_)->AddAppWindow(this);
293 293
294 if (new_params.hidden) { 294 if (new_params.hidden) {
295 // Although the window starts hidden by default, calling Hide() here 295 // Although the window starts hidden by default, calling Hide() here
296 // notifies observers of the window being hidden. 296 // notifies observers of the window being hidden.
297 Hide(); 297 Hide();
298 } else { 298 } else {
299 // Panels are not activated by default. 299 // Panels are not activated by default.
300 Show(window_type_is_panel() || !new_params.focused ? SHOW_INACTIVE 300 Show(window_type_is_panel() || !new_params.focused ? SHOW_INACTIVE
301 : SHOW_ACTIVE); 301 : SHOW_ACTIVE);
302
303 // These states may cause the window to show, so they are ignored if the
304 // window is initially hidden.
305 if (new_params.state == ui::SHOW_STATE_FULLSCREEN)
306 Fullscreen();
307 else if (new_params.state == ui::SHOW_STATE_MAXIMIZED)
308 Maximize();
309 else if (new_params.state == ui::SHOW_STATE_MINIMIZED)
310 Minimize();
302 } 311 }
303 312
304 if (new_params.state == ui::SHOW_STATE_FULLSCREEN)
305 Fullscreen();
306 else if (new_params.state == ui::SHOW_STATE_MAXIMIZED)
307 Maximize();
308 else if (new_params.state == ui::SHOW_STATE_MINIMIZED)
309 Minimize();
310
311 OnNativeWindowChanged(); 313 OnNativeWindowChanged();
312 314
313 // When the render view host is changed, the native window needs to know 315 // When the render view host is changed, the native window needs to know
314 // about it in case it has any setup to do to make the renderer appear 316 // about it in case it has any setup to do to make the renderer appear
315 // properly. In particular, on Windows, the view's clickthrough region needs 317 // properly. In particular, on Windows, the view's clickthrough region needs
316 // to be set[ 318 // to be set[
317 ExtensionsBrowserClient* client = ExtensionsBrowserClient::Get(); 319 ExtensionsBrowserClient* client = ExtensionsBrowserClient::Get();
318 registrar_.Add(this, 320 registrar_.Add(this,
319 NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED, 321 NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED,
320 content::Source<content::BrowserContext>( 322 content::Source<content::BrowserContext>(
(...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after
1098 region.bounds.x(), 1100 region.bounds.x(),
1099 region.bounds.y(), 1101 region.bounds.y(),
1100 region.bounds.right(), 1102 region.bounds.right(),
1101 region.bounds.bottom(), 1103 region.bounds.bottom(),
1102 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); 1104 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op);
1103 } 1105 }
1104 return sk_region; 1106 return sk_region;
1105 } 1107 }
1106 1108
1107 } // namespace extensions 1109 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/apps/app_window_desktop_native_widget_aura_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698