OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_JSMESSAGE_BOX_CLIENT_H_ | 5 #ifndef CHROME_BROWSER_JSMESSAGE_BOX_CLIENT_H_ |
6 #define CHROME_BROWSER_JSMESSAGE_BOX_CLIENT_H_ | 6 #define CHROME_BROWSER_JSMESSAGE_BOX_CLIENT_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 // JavaScriptMessageBoxClient | 9 // JavaScriptMessageBoxClient |
10 // | 10 // |
11 // An interface implemented by an object that receives results from JavaScript | 11 // An interface implemented by an object that receives results from JavaScript |
12 // message boxes (alert, confirm, and prompt). | 12 // message boxes (alert, confirm, and prompt). |
13 // | 13 // |
14 | 14 |
15 #include <string> | 15 #include <string> |
16 | 16 |
17 #include "gfx/native_widget_types.h" | 17 #include "gfx/native_widget_types.h" |
18 | 18 |
19 class ExtensionHost; | 19 class ExtensionHost; |
20 class GURL; | 20 class GURL; |
21 class Profile; | |
22 class TabContents; | 21 class TabContents; |
23 namespace IPC { | 22 namespace IPC { |
24 class Message; | 23 class Message; |
25 } | 24 } |
26 | 25 |
27 class JavaScriptMessageBoxClient { | 26 class JavaScriptMessageBoxClient { |
28 public: | 27 public: |
29 virtual ~JavaScriptMessageBoxClient() {} | 28 virtual ~JavaScriptMessageBoxClient() {} |
30 | 29 |
31 // Returns the title to use for the message box. | 30 // Returns the title to use for the message box. |
(...skipping 13 matching lines...) Expand all Loading... |
45 | 44 |
46 // Returns the TabContents or ExtensionHost associated with this message | 45 // Returns the TabContents or ExtensionHost associated with this message |
47 // box -- in practice, the object implementing this interface. Exactly one of | 46 // box -- in practice, the object implementing this interface. Exactly one of |
48 // these must be non-NULL; behavior is undefined (read: it'll probably crash) | 47 // these must be non-NULL; behavior is undefined (read: it'll probably crash) |
49 // if that is not the case. | 48 // if that is not the case. |
50 virtual TabContents* AsTabContents() = 0; | 49 virtual TabContents* AsTabContents() = 0; |
51 virtual ExtensionHost* AsExtensionHost() = 0; | 50 virtual ExtensionHost* AsExtensionHost() = 0; |
52 }; | 51 }; |
53 | 52 |
54 #endif // CHROME_BROWSER_JSMESSAGE_BOX_CLIENT_H_ | 53 #endif // CHROME_BROWSER_JSMESSAGE_BOX_CLIENT_H_ |
OLD | NEW |