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

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

Issue 1717283003: tracing: Make ConvertableToTraceFormat move-only scoped_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 9 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 #include "components/exo/shell_surface.h" 5 #include "components/exo/shell_surface.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/shell_window_ids.h" 8 #include "ash/shell_window_ids.h"
9 #include "ash/wm/window_state.h" 9 #include "ash/wm/window_state.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 // static 222 // static
223 void ShellSurface::SetMainSurface(aura::Window* window, Surface* surface) { 223 void ShellSurface::SetMainSurface(aura::Window* window, Surface* surface) {
224 window->SetProperty(kMainSurfaceKey, surface); 224 window->SetProperty(kMainSurfaceKey, surface);
225 } 225 }
226 226
227 // static 227 // static
228 Surface* ShellSurface::GetMainSurface(const aura::Window* window) { 228 Surface* ShellSurface::GetMainSurface(const aura::Window* window) {
229 return window->GetProperty(kMainSurfaceKey); 229 return window->GetProperty(kMainSurfaceKey);
230 } 230 }
231 231
232 scoped_refptr<base::trace_event::TracedValue> ShellSurface::AsTracedValue() 232 scoped_ptr<base::trace_event::TracedValue> ShellSurface::AsTracedValue() const {
233 const { 233 scoped_ptr<base::trace_event::TracedValue> value(
234 scoped_refptr<base::trace_event::TracedValue> value = 234 new base::trace_event::TracedValue());
235 new base::trace_event::TracedValue;
236 value->SetString("title", base::UTF16ToUTF8(title_)); 235 value->SetString("title", base::UTF16ToUTF8(title_));
237 value->SetString("application_id", application_id_); 236 value->SetString("application_id", application_id_);
238 return value; 237 return value;
239 } 238 }
240 239
241 //////////////////////////////////////////////////////////////////////////////// 240 ////////////////////////////////////////////////////////////////////////////////
242 // SurfaceDelegate overrides: 241 // SurfaceDelegate overrides:
243 242
244 void ShellSurface::OnSurfaceCommit() { 243 void ShellSurface::OnSurfaceCommit() {
245 surface_->CommitSurfaceHierarchy(); 244 surface_->CommitSurfaceHierarchy();
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 if (configure_callback_.is_null()) 405 if (configure_callback_.is_null())
407 return; 406 return;
408 407
409 configure_callback_.Run( 408 configure_callback_.Run(
410 widget_->GetWindowBoundsInScreen().size(), 409 widget_->GetWindowBoundsInScreen().size(),
411 ash::wm::GetWindowState(widget_->GetNativeWindow())->GetStateType(), 410 ash::wm::GetWindowState(widget_->GetNativeWindow())->GetStateType(),
412 widget_->IsActive()); 411 widget_->IsActive());
413 } 412 }
414 413
415 } // namespace exo 414 } // namespace exo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698