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

Side by Side Diff: components/exo/shell_surface.cc

Issue 2517833003: Allow to create ARC++ windows minimized on startup. (Closed)
Patch Set: Cleaned up the test. Created 4 years, 1 month 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 "components/exo/shell_surface.h" 5 #include "components/exo/shell_surface.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ash/aura/wm_window_aura.h" 9 #include "ash/aura/wm_window_aura.h"
10 #include "ash/common/shelf/wm_shelf.h" 10 #include "ash/common/shelf/wm_shelf.h"
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 // Note: This will ask client to configure its surface even if already 440 // Note: This will ask client to configure its surface even if already
441 // maximized. 441 // maximized.
442 ScopedConfigure scoped_configure(this, true); 442 ScopedConfigure scoped_configure(this, true);
443 widget_->Maximize(); 443 widget_->Maximize();
444 } 444 }
445 445
446 void ShellSurface::Minimize() { 446 void ShellSurface::Minimize() {
447 TRACE_EVENT0("exo", "ShellSurface::Minimize"); 447 TRACE_EVENT0("exo", "ShellSurface::Minimize");
448 448
449 if (!widget_) 449 if (!widget_)
450 return; 450 CreateShellSurfaceWidget(ui::SHOW_STATE_MINIMIZED);
451 451
452 // Note: This will ask client to configure its surface even if already 452 // Note: This will ask client to configure its surface even if already
453 // minimized. 453 // minimized.
454 ScopedConfigure scoped_configure(this, true); 454 ScopedConfigure scoped_configure(this, true);
455 widget_->Minimize(); 455 widget_->Minimize();
456 } 456 }
457 457
458 void ShellSurface::Restore() { 458 void ShellSurface::Restore() {
459 TRACE_EVENT0("exo", "ShellSurface::Restore"); 459 TRACE_EVENT0("exo", "ShellSurface::Restore");
460 460
(...skipping 941 matching lines...) Expand 10 before | Expand all | Expand 10 after
1402 shadow_overlay_->layer()->Add(shadow->layer()); 1402 shadow_overlay_->layer()->Add(shadow->layer());
1403 window->AddChild(shadow_overlay_); 1403 window->AddChild(shadow_overlay_);
1404 shadow_overlay_->Show(); 1404 shadow_overlay_->Show();
1405 } 1405 }
1406 shadow_overlay_->SetBounds(shadow_bounds); 1406 shadow_overlay_->SetBounds(shadow_bounds);
1407 shadow->SetContentBounds(gfx::Rect(shadow_bounds.size())); 1407 shadow->SetContentBounds(gfx::Rect(shadow_bounds.size()));
1408 } 1408 }
1409 } 1409 }
1410 1410
1411 } // namespace exo 1411 } // namespace exo
OLDNEW
« no previous file with comments | « no previous file | components/exo/shell_surface_unittest.cc » ('j') | components/exo/shell_surface_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698