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

Side by Side Diff: chrome/browser/ui/cocoa/web_dialog_window_controller.h

Issue 1640043002: Mac (cleanup): Remove WebDialogs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_COCOA_WEB_DIALOG_WINDOW_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_COCOA_WEB_DIALOG_WINDOW_CONTROLLER_H_
7
8 #import <Cocoa/Cocoa.h>
9
10 #include "base/memory/scoped_ptr.h"
11 #include "ui/web_dialogs/web_dialog_ui.h"
12
13 class WebDialogWindowDelegateBridge;
14
15 namespace content {
16 class BrowserContext;
17 class WebContents;
18 }
19
20 // This controller manages a dialog box with properties and HTML content taken
21 // from a WebDialogDelegate object.
22 @interface WebDialogWindowController : NSWindowController<NSWindowDelegate> {
23 @private
24 // Order here is important, as webContents_ may send messages to
25 // delegate_ when it gets destroyed.
26 scoped_ptr<WebDialogWindowDelegateBridge> delegate_;
27 scoped_ptr<content::WebContents> webContents_;
28 }
29
30 // Creates and shows an WebDialogWindowController with the given
31 // delegate and profile. The window is automatically destroyed when it, or its
32 // profile, is closed. Returns the created window.
33 //
34 // Make sure to use the returned window only when you know it is safe
35 // to do so, i.e. before OnDialogClosed() is called on the delegate.
36 + (NSWindow*)showWebDialog:(ui::WebDialogDelegate*)delegate
37 context:(content::BrowserContext*)context;
38
39 @end
40
41 @interface WebDialogWindowController (TestingAPI)
42
43 // This is the designated initializer. However, this is exposed only
44 // for testing; use -showWebDialog:context: instead.
45 - (id)initWithDelegate:(ui::WebDialogDelegate*)delegate
46 context:(content::BrowserContext*)context;
47
48 // Loads the HTML content from the delegate; this is not a lightweight
49 // process which is why it is not part of the constructor. Must be
50 // called before -showWebDialog:context:.
51 - (void)loadDialogContents;
52
53 @end
54
55 #endif // CHROME_BROWSER_UI_COCOA_WEB_DIALOG_WINDOW_CONTROLLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_cocoa.mm ('k') | chrome/browser/ui/cocoa/web_dialog_window_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698