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

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

Issue 2184103003: arc: Implement proper Arc window activation for task moving to front. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix rebase 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
« no previous file with comments | « components/exo/shell_surface.h ('k') | components/exo/wayland/server.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ash/aura/wm_window_aura.h" 7 #include "ash/aura/wm_window_aura.h"
8 #include "ash/common/shell_window_ids.h" 8 #include "ash/common/shell_window_ids.h"
9 #include "ash/common/wm/window_resizer.h" 9 #include "ash/common/wm/window_resizer.h"
10 #include "ash/common/wm/window_state.h" 10 #include "ash/common/wm/window_state.h"
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 wm::RemoveTransientChild(parent_, widget_->GetNativeWindow()); 328 wm::RemoveTransientChild(parent_, widget_->GetNativeWindow());
329 } 329 }
330 parent_ = parent ? parent->GetWidget()->GetNativeWindow() : nullptr; 330 parent_ = parent ? parent->GetWidget()->GetNativeWindow() : nullptr;
331 if (parent_) { 331 if (parent_) {
332 parent_->AddObserver(this); 332 parent_->AddObserver(this);
333 if (widget_) 333 if (widget_)
334 wm::AddTransientChild(parent_, widget_->GetNativeWindow()); 334 wm::AddTransientChild(parent_, widget_->GetNativeWindow());
335 } 335 }
336 } 336 }
337 337
338 void ShellSurface::Activate() {
339 TRACE_EVENT0("exo", "ShellSurface::Activate");
340
341 if (!widget_ || widget_->IsActive())
342 return;
343
344 widget_->Activate();
345 }
346
338 void ShellSurface::Maximize() { 347 void ShellSurface::Maximize() {
339 TRACE_EVENT0("exo", "ShellSurface::Maximize"); 348 TRACE_EVENT0("exo", "ShellSurface::Maximize");
340 349
341 if (!widget_) 350 if (!widget_)
342 CreateShellSurfaceWidget(ui::SHOW_STATE_MAXIMIZED); 351 CreateShellSurfaceWidget(ui::SHOW_STATE_MAXIMIZED);
343 352
344 // Note: This will ask client to configure its surface even if already 353 // Note: This will ask client to configure its surface even if already
345 // maximized. 354 // maximized.
346 ScopedConfigure scoped_configure(this, true); 355 ScopedConfigure scoped_configure(this, true);
347 widget_->Maximize(); 356 widget_->Maximize();
(...skipping 883 matching lines...) Expand 10 before | Expand all | Expand 10 after
1231 shadow_overlay_->layer()->Add(shadow->layer()); 1240 shadow_overlay_->layer()->Add(shadow->layer());
1232 window->AddChild(shadow_overlay_); 1241 window->AddChild(shadow_overlay_);
1233 shadow_overlay_->Show(); 1242 shadow_overlay_->Show();
1234 } 1243 }
1235 shadow_overlay_->SetBounds(shadow_bounds); 1244 shadow_overlay_->SetBounds(shadow_bounds);
1236 shadow->SetContentBounds(gfx::Rect(shadow_bounds.size())); 1245 shadow->SetContentBounds(gfx::Rect(shadow_bounds.size()));
1237 } 1246 }
1238 } 1247 }
1239 1248
1240 } // namespace exo 1249 } // namespace exo
OLDNEW
« no previous file with comments | « components/exo/shell_surface.h ('k') | components/exo/wayland/server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698