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

Side by Side Diff: chrome/browser/jsmessage_box_client.h

Issue 373006: Implement window.alert() and its cousins for extensions.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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
« no previous file with comments | « chrome/browser/extensions/extension_host.cc ('k') | chrome/browser/jsmessage_box_handler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2009 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_JSMESSAGE_BOX_CLIENT_H_
6 #define CHROME_BROWSER_JSMESSAGE_BOX_CLIENT_H_
7
8 // JavaScriptMessageBoxClient
9 //
10 // An interface implemented by an object that receives results from JavaScript
11 // message boxes (alert, confirm, and prompt).
12 //
13
14 #include <string>
15
16 #include "app/gfx/native_widget_types.h"
17
18 class GURL;
19 class Profile;
20 class TabContents;
21 namespace IPC {
22 class Message;
23 }
24
25 class JavaScriptMessageBoxClient {
26 public:
27 virtual ~JavaScriptMessageBoxClient() {}
28
29 // Returns the title to use for the message box.
30 virtual std::wstring GetMessageBoxTitle(const GURL& frame_url,
31 bool is_alert) = 0;
32
33 // Returns the root native window with which the message box is associated.
34 virtual gfx::NativeWindow GetMessageBoxRootWindow() = 0;
35
36 // AppModalDialog calls this when the dialog is closed.
37 virtual void OnMessageBoxClosed(IPC::Message* reply_msg,
38 bool success,
39 const std::wstring& prompt) = 0;
40
41 // Indicates whether additional message boxes should be suppressed.
42 virtual void SetSuppressMessageBoxes(bool suppress_message_boxes) = 0;
43
44 // Returns the TabContents associated with this message box -- in practice,
45 // the TabContents implementing this interface -- or NULL if it has no
46 // TabContents (e.g., it's an ExtensionHost).
47 virtual TabContents* AsTabContents() = 0;
48 };
49
50 # endif // CHROME_BROWSER_JSMESSAGE_BOX_CLIENT_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_host.cc ('k') | chrome/browser/jsmessage_box_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698