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

Side by Side Diff: remoting/host/continue_window_chromeos.cc

Issue 1864213002: Convert //remoting to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac IWYU 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 | « remoting/host/config_file_watcher_unittest.cc ('k') | remoting/host/continue_window_linux.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "remoting/host/continue_window.h" 5 #include "remoting/host/continue_window.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/memory/ptr_util.h"
8 #include "remoting/base/string_resources.h" 9 #include "remoting/base/string_resources.h"
9 #include "remoting/host/chromeos/message_box.h" 10 #include "remoting/host/chromeos/message_box.h"
10 #include "ui/base/l10n/l10n_util.h" 11 #include "ui/base/l10n/l10n_util.h"
11 12
12 namespace remoting { 13 namespace remoting {
13 14
14 namespace { 15 namespace {
15 16
16 class ContinueWindowAura : public ContinueWindow { 17 class ContinueWindowAura : public ContinueWindow {
17 public: 18 public:
18 ContinueWindowAura(); 19 ContinueWindowAura();
19 ~ContinueWindowAura() override; 20 ~ContinueWindowAura() override;
20 21
21 void OnMessageBoxResult(MessageBox::Result result); 22 void OnMessageBoxResult(MessageBox::Result result);
22 23
23 protected: 24 protected:
24 // ContinueWindow interface. 25 // ContinueWindow interface.
25 void ShowUi() override; 26 void ShowUi() override;
26 void HideUi() override; 27 void HideUi() override;
27 28
28 private: 29 private:
29 scoped_ptr<MessageBox> message_box_; 30 std::unique_ptr<MessageBox> message_box_;
30 DISALLOW_COPY_AND_ASSIGN(ContinueWindowAura); 31 DISALLOW_COPY_AND_ASSIGN(ContinueWindowAura);
31 }; 32 };
32 33
33 ContinueWindowAura::ContinueWindowAura() { 34 ContinueWindowAura::ContinueWindowAura() {
34 message_box_.reset(new MessageBox( 35 message_box_.reset(new MessageBox(
35 l10n_util::GetStringUTF16(IDS_MODE_IT2ME), // title 36 l10n_util::GetStringUTF16(IDS_MODE_IT2ME), // title
36 l10n_util::GetStringUTF16(IDS_CONTINUE_PROMPT), // dialog label 37 l10n_util::GetStringUTF16(IDS_CONTINUE_PROMPT), // dialog label
37 l10n_util::GetStringUTF16(IDS_CONTINUE_BUTTON), // ok label 38 l10n_util::GetStringUTF16(IDS_CONTINUE_BUTTON), // ok label
38 l10n_util::GetStringUTF16(IDS_STOP_SHARING_BUTTON), // cancel label 39 l10n_util::GetStringUTF16(IDS_STOP_SHARING_BUTTON), // cancel label
39 base::Bind(&ContinueWindowAura::OnMessageBoxResult, 40 base::Bind(&ContinueWindowAura::OnMessageBoxResult,
(...skipping 16 matching lines...) Expand all
56 message_box_->Show(); 57 message_box_->Show();
57 } 58 }
58 59
59 void ContinueWindowAura::HideUi() { 60 void ContinueWindowAura::HideUi() {
60 message_box_->Hide(); 61 message_box_->Hide();
61 } 62 }
62 63
63 } // namespace 64 } // namespace
64 65
65 // static 66 // static
66 scoped_ptr<HostWindow> HostWindow::CreateContinueWindow() { 67 std::unique_ptr<HostWindow> HostWindow::CreateContinueWindow() {
67 return make_scoped_ptr(new ContinueWindowAura()); 68 return base::WrapUnique(new ContinueWindowAura());
68 } 69 }
69 70
70 } // namespace remoting 71 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/config_file_watcher_unittest.cc ('k') | remoting/host/continue_window_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698