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

Side by Side Diff: content/shell/shell_javascript_dialog.h

Issue 10451047: content: Move javascript_message_type.h into content/ from ui/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rm CONTEXT_EXPORT Created 8 years, 6 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
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | content/shell/shell_javascript_dialog_creator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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 CONTENT_SHELL_SHELL_JAVASCRIPT_DIALOG_H_ 5 #ifndef CONTENT_SHELL_SHELL_JAVASCRIPT_DIALOG_H_
6 #define CONTENT_SHELL_SHELL_JAVASCRIPT_DIALOG_H_ 6 #define CONTENT_SHELL_SHELL_JAVASCRIPT_DIALOG_H_
7 #pragma once 7 #pragma once
8 8
9 #include "content/public/browser/javascript_dialogs.h" 9 #include "content/public/browser/javascript_dialogs.h"
10 10
11 #if defined(OS_MACOSX) 11 #if defined(OS_MACOSX)
12 #if __OBJC__ 12 #if __OBJC__
13 @class ShellJavaScriptDialogHelper; 13 @class ShellJavaScriptDialogHelper;
14 #else 14 #else
15 class ShellJavaScriptDialogHelper; 15 class ShellJavaScriptDialogHelper;
16 #endif // __OBJC__ 16 #endif // __OBJC__
17 #endif // defined(OS_MACOSX) 17 #endif // defined(OS_MACOSX)
18 18
19 namespace content { 19 namespace content {
20 20
21 class ShellJavaScriptDialogCreator; 21 class ShellJavaScriptDialogCreator;
22 22
23 class ShellJavaScriptDialog { 23 class ShellJavaScriptDialog {
24 public: 24 public:
25 ShellJavaScriptDialog( 25 ShellJavaScriptDialog(
26 ShellJavaScriptDialogCreator* creator, 26 ShellJavaScriptDialogCreator* creator,
27 ui::JavascriptMessageType javascript_message_type, 27 JavaScriptMessageType message_type,
28 const string16& message_text, 28 const string16& message_text,
29 const string16& default_prompt_text, 29 const string16& default_prompt_text,
30 const JavaScriptDialogCreator::DialogClosedCallback& callback); 30 const JavaScriptDialogCreator::DialogClosedCallback& callback);
31 ~ShellJavaScriptDialog(); 31 ~ShellJavaScriptDialog();
32 32
33 // Called to cancel a dialog mid-flight. 33 // Called to cancel a dialog mid-flight.
34 void Cancel(); 34 void Cancel();
35 35
36 private: 36 private:
37 ShellJavaScriptDialogCreator* creator_; 37 ShellJavaScriptDialogCreator* creator_;
38 JavaScriptDialogCreator::DialogClosedCallback callback_; 38 JavaScriptDialogCreator::DialogClosedCallback callback_;
39 39
40 #if defined(OS_MACOSX) 40 #if defined(OS_MACOSX)
41 ShellJavaScriptDialogHelper* helper_; // owned 41 ShellJavaScriptDialogHelper* helper_; // owned
42 #elif defined(OS_WIN) 42 #elif defined(OS_WIN)
43 ui::JavascriptMessageType message_type_; 43 JavaScriptMessageType message_type_;
44 HWND dialog_win_; 44 HWND dialog_win_;
45 string16 message_text_; 45 string16 message_text_;
46 string16 default_prompt_text_; 46 string16 default_prompt_text_;
47 static INT_PTR CALLBACK DialogProc(HWND dialog, UINT message, WPARAM wparam, 47 static INT_PTR CALLBACK DialogProc(HWND dialog, UINT message, WPARAM wparam,
48 LPARAM lparam); 48 LPARAM lparam);
49 #endif 49 #endif
50 50
51 DISALLOW_COPY_AND_ASSIGN(ShellJavaScriptDialog); 51 DISALLOW_COPY_AND_ASSIGN(ShellJavaScriptDialog);
52 }; 52 };
53 53
54 } // namespace content 54 } // namespace content
55 55
56 #endif // CONTENT_SHELL_SHELL_JAVASCRIPT_DIALOG_H_ 56 #endif // CONTENT_SHELL_SHELL_JAVASCRIPT_DIALOG_H_
OLDNEW
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | content/shell/shell_javascript_dialog_creator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698