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

Side by Side Diff: content/browser/modal_html_dialog_delegate.h

Issue 6576020: Remove Gears from Chrome (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: windows fixes Created 9 years, 9 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) 2011 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 CONTENT_BROWSER_MODAL_HTML_DIALOG_DELEGATE_H_
6 #define CONTENT_BROWSER_MODAL_HTML_DIALOG_DELEGATE_H_
7 #pragma once
8
9 #include <vector>
10
11 #include "chrome/browser/ui/webui/html_dialog_ui.h"
12 #include "content/common/notification_observer.h"
13 #include "content/common/notification_registrar.h"
14
15 namespace gfx {
16 class Size;
17 }
18
19 namespace IPC {
20 class Message;
21 }
22
23 // This class can only be used on the UI thread.
24 class ModalHtmlDialogDelegate
25 : public HtmlDialogUIDelegate,
26 public NotificationObserver {
27 public:
28 ModalHtmlDialogDelegate(const GURL& url,
29 int width, int height,
30 const std::string& json_arguments,
31 IPC::Message* sync_result,
32 TabContents* contents);
33 ~ModalHtmlDialogDelegate();
34
35 // Notification service callback.
36 virtual void Observe(NotificationType type,
37 const NotificationSource& source,
38 const NotificationDetails& details);
39
40 // HTMLDialogUIDelegate implementation:
41 virtual bool IsDialogModal() const;
42 virtual std::wstring GetDialogTitle() const;
43 virtual GURL GetDialogContentURL() const;
44 virtual void GetWebUIMessageHandlers(
45 std::vector<WebUIMessageHandler*>* handlers) const { }
46 virtual void GetDialogSize(gfx::Size* size) const;
47 virtual std::string GetDialogArgs() const;
48 virtual void OnDialogClosed(const std::string& json_retval);
49 virtual void OnCloseContents(TabContents* source, bool* out_close_dialog) { }
50 virtual bool ShouldShowDialogTitle() const;
51
52 private:
53 NotificationRegistrar registrar_;
54
55 // The TabContents that opened the dialog.
56 TabContents* contents_;
57
58 // The parameters needed to display a modal HTML dialog.
59 HtmlDialogUI::HtmlDialogParams params_;
60
61 // Once we get our reply in OnModalDialogResponse we'll need to respond to the
62 // plugin using this |sync_result| pointer so we store it between calls.
63 IPC::Message* sync_response_;
64
65 DISALLOW_COPY_AND_ASSIGN(ModalHtmlDialogDelegate);
66 };
67
68 #endif // CONTENT_BROWSER_MODAL_HTML_DIALOG_DELEGATE_H_
OLDNEW
« no previous file with comments | « content/browser/geolocation/win7_location_provider_win.cc ('k') | content/browser/modal_html_dialog_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698