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

Side by Side Diff: chrome/browser/ui/webui/constrained_web_dialog_delegate_base.h

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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 (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 #ifndef CHROME_BROWSER_UI_WEBUI_CONSTRAINED_WEB_DIALOG_DELEGATE_BASE_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_CONSTRAINED_WEB_DIALOG_DELEGATE_BASE_H_
6 #define CHROME_BROWSER_UI_WEBUI_CONSTRAINED_WEB_DIALOG_DELEGATE_BASE_H_ 6 #define CHROME_BROWSER_UI_WEBUI_CONSTRAINED_WEB_DIALOG_DELEGATE_BASE_H_
7 7
8 #include <memory>
9
8 #include "base/macros.h" 10 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "chrome/browser/ui/webui/constrained_web_dialog_ui.h" 11 #include "chrome/browser/ui/webui/constrained_web_dialog_ui.h"
11 #include "ui/web_dialogs/web_dialog_ui.h" 12 #include "ui/web_dialogs/web_dialog_ui.h"
12 #include "ui/web_dialogs/web_dialog_web_contents_delegate.h" 13 #include "ui/web_dialogs/web_dialog_web_contents_delegate.h"
13 14
14 namespace content { 15 namespace content {
15 class BrowserContext; 16 class BrowserContext;
16 } 17 }
17 18
18 namespace ui { 19 namespace ui {
19 class WebDialogDelegate; 20 class WebDialogDelegate;
(...skipping 26 matching lines...) Expand all
46 47
47 // WebDialogWebContentsDelegate interface. 48 // WebDialogWebContentsDelegate interface.
48 void HandleKeyboardEvent( 49 void HandleKeyboardEvent(
49 content::WebContents* source, 50 content::WebContents* source,
50 const content::NativeWebKeyboardEvent& event) override; 51 const content::NativeWebKeyboardEvent& event) override;
51 52
52 // Resize the dialog to the given size. 53 // Resize the dialog to the given size.
53 virtual void ResizeToGivenSize(const gfx::Size size); 54 virtual void ResizeToGivenSize(const gfx::Size size);
54 55
55 private: 56 private:
56 scoped_ptr<ui::WebDialogDelegate> web_dialog_delegate_; 57 std::unique_ptr<ui::WebDialogDelegate> web_dialog_delegate_;
57 58
58 // Holds the HTML to display in the constrained dialog. 59 // Holds the HTML to display in the constrained dialog.
59 scoped_ptr<content::WebContents> web_contents_; 60 std::unique_ptr<content::WebContents> web_contents_;
60 61
61 // Was the dialog closed from WebUI (in which case |web_dialog_delegate_|'s 62 // Was the dialog closed from WebUI (in which case |web_dialog_delegate_|'s
62 // OnDialogClosed() method has already been called)? 63 // OnDialogClosed() method has already been called)?
63 bool closed_via_webui_; 64 bool closed_via_webui_;
64 65
65 // If true, release |web_contents_| on close instead of destroying it. 66 // If true, release |web_contents_| on close instead of destroying it.
66 bool release_contents_on_close_; 67 bool release_contents_on_close_;
67 68
68 scoped_ptr<WebDialogWebContentsDelegate> override_tab_delegate_; 69 std::unique_ptr<WebDialogWebContentsDelegate> override_tab_delegate_;
69 70
70 DISALLOW_COPY_AND_ASSIGN(ConstrainedWebDialogDelegateBase); 71 DISALLOW_COPY_AND_ASSIGN(ConstrainedWebDialogDelegateBase);
71 }; 72 };
72 73
73 #endif // CHROME_BROWSER_UI_WEBUI_CONSTRAINED_WEB_DIALOG_DELEGATE_BASE_H_ 74 #endif // CHROME_BROWSER_UI_WEBUI_CONSTRAINED_WEB_DIALOG_DELEGATE_BASE_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chromeos/slow_ui.cc ('k') | chrome/browser/ui/webui/constrained_web_dialog_ui_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698