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

Side by Side Diff: content/shell/browser/shell_javascript_dialog_manager.h

Issue 1874903002: Convert //content from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix indent 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef CONTENT_SHELL_BROWSER_SHELL_JAVASCRIPT_DIALOG_MANAGER_H_ 5 #ifndef CONTENT_SHELL_BROWSER_SHELL_JAVASCRIPT_DIALOG_MANAGER_H_
6 #define CONTENT_SHELL_BROWSER_SHELL_JAVASCRIPT_DIALOG_MANAGER_H_ 6 #define CONTENT_SHELL_BROWSER_SHELL_JAVASCRIPT_DIALOG_MANAGER_H_
7 7
8 #include <memory>
9
8 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
9 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
10 #include "base/macros.h" 12 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "build/build_config.h" 13 #include "build/build_config.h"
13 #include "content/public/browser/javascript_dialog_manager.h" 14 #include "content/public/browser/javascript_dialog_manager.h"
14 15
15 namespace content { 16 namespace content {
16 17
17 class ShellJavaScriptDialog; 18 class ShellJavaScriptDialog;
18 19
19 class ShellJavaScriptDialogManager : public JavaScriptDialogManager { 20 class ShellJavaScriptDialogManager : public JavaScriptDialogManager {
20 public: 21 public:
21 ShellJavaScriptDialogManager(); 22 ShellJavaScriptDialogManager();
(...skipping 23 matching lines...) Expand all
45 void set_dialog_request_callback(const base::Closure& callback) { 46 void set_dialog_request_callback(const base::Closure& callback) {
46 dialog_request_callback_ = callback; 47 dialog_request_callback_ = callback;
47 } 48 }
48 void set_should_proceed_on_beforeunload(bool proceed) { 49 void set_should_proceed_on_beforeunload(bool proceed) {
49 should_proceed_on_beforeunload_ = proceed; 50 should_proceed_on_beforeunload_ = proceed;
50 } 51 }
51 52
52 private: 53 private:
53 #if defined(OS_MACOSX) || defined(OS_WIN) 54 #if defined(OS_MACOSX) || defined(OS_WIN)
54 // The dialog being shown. No queueing. 55 // The dialog being shown. No queueing.
55 scoped_ptr<ShellJavaScriptDialog> dialog_; 56 std::unique_ptr<ShellJavaScriptDialog> dialog_;
56 #else 57 #else
57 // TODO: implement ShellJavaScriptDialog for other platforms, drop this #if 58 // TODO: implement ShellJavaScriptDialog for other platforms, drop this #if
58 #endif 59 #endif
59 60
60 base::Closure dialog_request_callback_; 61 base::Closure dialog_request_callback_;
61 62
62 // Whether to automatically proceed when asked to display a BeforeUnload 63 // Whether to automatically proceed when asked to display a BeforeUnload
63 // dialog. 64 // dialog.
64 bool should_proceed_on_beforeunload_; 65 bool should_proceed_on_beforeunload_;
65 66
66 DialogClosedCallback before_unload_callback_; 67 DialogClosedCallback before_unload_callback_;
67 68
68 DISALLOW_COPY_AND_ASSIGN(ShellJavaScriptDialogManager); 69 DISALLOW_COPY_AND_ASSIGN(ShellJavaScriptDialogManager);
69 }; 70 };
70 71
71 } // namespace content 72 } // namespace content
72 73
73 #endif // CONTENT_SHELL_BROWSER_SHELL_JAVASCRIPT_DIALOG_MANAGER_H_ 74 #endif // CONTENT_SHELL_BROWSER_SHELL_JAVASCRIPT_DIALOG_MANAGER_H_
OLDNEW
« no previous file with comments | « content/shell/browser/shell_devtools_manager_delegate.cc ('k') | content/shell/browser/shell_net_log.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698