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

Side by Side Diff: mash/example/window_type_launcher/window_type_launcher.cc

Issue 1857623003: convert //mash to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | « mash/example/window_type_launcher/window_type_launcher.h ('k') | mash/init/init.h » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "mash/example/window_type_launcher/window_type_launcher.h" 5 #include "mash/example/window_type_launcher/window_type_launcher.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "mash/session/public/interfaces/session.mojom.h" 10 #include "mash/session/public/interfaces/session.mojom.h"
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 views::LabelButton* logout_button_; 353 views::LabelButton* logout_button_;
354 views::LabelButton* switch_user_button_; 354 views::LabelButton* switch_user_button_;
355 views::LabelButton* widgets_button_; 355 views::LabelButton* widgets_button_;
356 views::LabelButton* system_modal_button_; 356 views::LabelButton* system_modal_button_;
357 views::LabelButton* window_modal_button_; 357 views::LabelButton* window_modal_button_;
358 views::LabelButton* child_modal_button_; 358 views::LabelButton* child_modal_button_;
359 views::LabelButton* transient_button_; 359 views::LabelButton* transient_button_;
360 views::LabelButton* examples_button_; 360 views::LabelButton* examples_button_;
361 views::LabelButton* show_hide_window_button_; 361 views::LabelButton* show_hide_window_button_;
362 views::LabelButton* show_web_notification_; 362 views::LabelButton* show_web_notification_;
363 scoped_ptr<views::MenuRunner> menu_runner_; 363 std::unique_ptr<views::MenuRunner> menu_runner_;
364 364
365 DISALLOW_COPY_AND_ASSIGN(WindowTypeLauncherView); 365 DISALLOW_COPY_AND_ASSIGN(WindowTypeLauncherView);
366 }; 366 };
367 367
368 } // namespace 368 } // namespace
369 369
370 WindowTypeLauncher::WindowTypeLauncher() {} 370 WindowTypeLauncher::WindowTypeLauncher() {}
371 WindowTypeLauncher::~WindowTypeLauncher() {} 371 WindowTypeLauncher::~WindowTypeLauncher() {}
372 372
373 void WindowTypeLauncher::Initialize(mojo::Connector* connector, 373 void WindowTypeLauncher::Initialize(mojo::Connector* connector,
374 const mojo::Identity& identity, 374 const mojo::Identity& identity,
375 uint32_t id) { 375 uint32_t id) {
376 aura_init_.reset(new views::AuraInit(connector, "views_mus_resources.pak")); 376 aura_init_.reset(new views::AuraInit(connector, "views_mus_resources.pak"));
377 377
378 views::WindowManagerConnection::Create(connector); 378 views::WindowManagerConnection::Create(connector);
379 379
380 views::Widget* widget = new views::Widget; 380 views::Widget* widget = new views::Widget;
381 views::Widget::InitParams params(views::Widget::InitParams::TYPE_WINDOW); 381 views::Widget::InitParams params(views::Widget::InitParams::TYPE_WINDOW);
382 params.delegate = new WindowTypeLauncherView(connector); 382 params.delegate = new WindowTypeLauncherView(connector);
383 widget->Init(params); 383 widget->Init(params);
384 widget->Show(); 384 widget->Show();
385 } 385 }
386 386
387 bool WindowTypeLauncher::ShellConnectionLost() { 387 bool WindowTypeLauncher::ShellConnectionLost() {
388 base::MessageLoop::current()->QuitWhenIdle(); 388 base::MessageLoop::current()->QuitWhenIdle();
389 return false; 389 return false;
390 } 390 }
OLDNEW
« no previous file with comments | « mash/example/window_type_launcher/window_type_launcher.h ('k') | mash/init/init.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698