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

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

Issue 10214001: WebDialogs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 | Annotate | Revision Log
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_WEBUI_HTML_DIALOG_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_HTML_DIALOG_CONTROLLER_H_
7 #pragma once
8
9 #include "chrome/browser/ui/webui/html_dialog_ui.h"
10 #include "content/public/browser/notification_observer.h"
11 #include "content/public/browser/notification_registrar.h"
12
13 class Browser;
14 class Profile;
15
16 // This provides the common functionality for HtmlDialogs of notifying the
17 // dialog that it should close when the browser that created it has closed to
18 // avoid using an old Profile object.
19 class HtmlDialogController : public content::NotificationObserver {
20 public:
21 HtmlDialogController(HtmlDialogUIDelegate* delegate,
22 Profile* profile,
23 Browser* browser);
24
25 // content::NotificationObserver implementation.
26 virtual void Observe(int type,
27 const content::NotificationSource& source,
28 const content::NotificationDetails& details) OVERRIDE;
29
30 private:
31 // The delegate controlled by this instance. This class is owned by the
32 // delegate.
33 HtmlDialogUIDelegate* dialog_delegate_;
34
35 // Used for notification of parent browser closing.
36 content::NotificationRegistrar registrar_;
37
38 DISALLOW_COPY_AND_ASSIGN(HtmlDialogController);
39 };
40
41 #endif // CHROME_BROWSER_UI_WEBUI_HTML_DIALOG_CONTROLLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/feedback_ui.cc ('k') | chrome/browser/ui/webui/html_dialog_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698