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

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

Issue 2225903002: arc: Implement proper Arc window activation for task moving to front. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: 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 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 wm::RemoveTransientChild(parent_, widget_->GetNativeWindow()); 327 wm::RemoveTransientChild(parent_, widget_->GetNativeWindow());
328 } 328 }
329 parent_ = parent ? parent->GetWidget()->GetNativeWindow() : nullptr; 329 parent_ = parent ? parent->GetWidget()->GetNativeWindow() : nullptr;
330 if (parent_) { 330 if (parent_) {
331 parent_->AddObserver(this); 331 parent_->AddObserver(this);
332 if (widget_) 332 if (widget_)
333 wm::AddTransientChild(parent_, widget_->GetNativeWindow()); 333 wm::AddTransientChild(parent_, widget_->GetNativeWindow());
334 } 334 }
335 } 335 }
336 336
337 void ShellSurface::Activate() {
338 TRACE_EVENT0("exo", "ShellSurface::Activate");
339
340 if (!widget_ || widget_->IsActive())
341 return;
342
343 widget_->Activate();
344 }
345
337 void ShellSurface::Maximize() { 346 void ShellSurface::Maximize() {
338 TRACE_EVENT0("exo", "ShellSurface::Maximize"); 347 TRACE_EVENT0("exo", "ShellSurface::Maximize");
339 348
340 if (!widget_) 349 if (!widget_)
341 CreateShellSurfaceWidget(ui::SHOW_STATE_MAXIMIZED); 350 CreateShellSurfaceWidget(ui::SHOW_STATE_MAXIMIZED);
342 351
343 // Note: This will ask client to configure its surface even if already 352 // Note: This will ask client to configure its surface even if already
344 // maximized. 353 // maximized.
345 ScopedConfigure scoped_configure(this, true); 354 ScopedConfigure scoped_configure(this, true);
346 widget_->Maximize(); 355 widget_->Maximize();
(...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after
1235 shadow_overlay_->layer()->Add(shadow->layer()); 1244 shadow_overlay_->layer()->Add(shadow->layer());
1236 window->AddChild(shadow_overlay_); 1245 window->AddChild(shadow_overlay_);
1237 shadow_overlay_->Show(); 1246 shadow_overlay_->Show();
1238 } 1247 }
1239 shadow_overlay_->SetBounds(shadow_bounds); 1248 shadow_overlay_->SetBounds(shadow_bounds);
1240 shadow->SetContentBounds(gfx::Rect(shadow_bounds.size())); 1249 shadow->SetContentBounds(gfx::Rect(shadow_bounds.size()));
1241 } 1250 }
1242 } 1251 }
1243 1252
1244 } // namespace exo 1253 } // 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