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

Side by Side Diff: components/app_modal/javascript_dialog_manager.cc

Issue 1921973002: Convert //components/[a-e]* from scoped_ptr 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
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 "components/app_modal/javascript_dialog_manager.h" 5 #include "components/app_modal/javascript_dialog_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 72
73 //////////////////////////////////////////////////////////////////////////////// 73 ////////////////////////////////////////////////////////////////////////////////
74 // JavaScriptDialogManager, public: 74 // JavaScriptDialogManager, public:
75 75
76 // static 76 // static
77 JavaScriptDialogManager* JavaScriptDialogManager::GetInstance() { 77 JavaScriptDialogManager* JavaScriptDialogManager::GetInstance() {
78 return base::Singleton<JavaScriptDialogManager>::get(); 78 return base::Singleton<JavaScriptDialogManager>::get();
79 } 79 }
80 80
81 void JavaScriptDialogManager::SetNativeDialogFactory( 81 void JavaScriptDialogManager::SetNativeDialogFactory(
82 scoped_ptr<JavaScriptNativeDialogFactory> factory) { 82 std::unique_ptr<JavaScriptNativeDialogFactory> factory) {
83 native_dialog_factory_ = std::move(factory); 83 native_dialog_factory_ = std::move(factory);
84 } 84 }
85 85
86 void JavaScriptDialogManager::SetExtensionsClient( 86 void JavaScriptDialogManager::SetExtensionsClient(
87 scoped_ptr<JavaScriptDialogExtensionsClient> extensions_client) { 87 std::unique_ptr<JavaScriptDialogExtensionsClient> extensions_client) {
88 extensions_client_ = std::move(extensions_client); 88 extensions_client_ = std::move(extensions_client);
89 } 89 }
90 90
91 //////////////////////////////////////////////////////////////////////////////// 91 ////////////////////////////////////////////////////////////////////////////////
92 // JavaScriptDialogManager, private: 92 // JavaScriptDialogManager, private:
93 93
94 JavaScriptDialogManager::JavaScriptDialogManager() 94 JavaScriptDialogManager::JavaScriptDialogManager()
95 : extensions_client_(new DefaultExtensionsClient) { 95 : extensions_client_(new DefaultExtensionsClient) {
96 } 96 }
97 97
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 // lazy background page after the dialog closes. (Dialogs are closed before 325 // lazy background page after the dialog closes. (Dialogs are closed before
326 // their WebContents is destroyed so |web_contents| is still valid here.) 326 // their WebContents is destroyed so |web_contents| is still valid here.)
327 extensions_client_->OnDialogClosed(web_contents); 327 extensions_client_->OnDialogClosed(web_contents);
328 328
329 last_close_time_ = base::TimeTicks::Now(); 329 last_close_time_ = base::TimeTicks::Now();
330 330
331 callback.Run(success, user_input); 331 callback.Run(success, user_input);
332 } 332 }
333 333
334 } // namespace app_modal 334 } // namespace app_modal
OLDNEW
« no previous file with comments | « components/app_modal/javascript_dialog_manager.h ('k') | components/app_modal/views/javascript_app_modal_dialog_views.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698