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

Side by Side Diff: ui/views/controls/webview/web_dialog_view.h

Issue 10916010: Relanding "views: Add a gyp file to build webview.". Try 2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: chromeos fixes Created 8 years, 3 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/content_shell.gypi ('k') | ui/views/controls/webview/webview.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 UI_VIEWS_CONTROLS_WEBVIEW_WEB_DIALOG_VIEW_H_ 5 #ifndef UI_VIEWS_CONTROLS_WEBVIEW_WEB_DIALOG_VIEW_H_
6 #define UI_VIEWS_CONTROLS_WEBVIEW_WEB_DIALOG_VIEW_H_ 6 #define UI_VIEWS_CONTROLS_WEBVIEW_WEB_DIALOG_VIEW_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/gtest_prod_util.h" 11 #include "base/gtest_prod_util.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "ui/gfx/size.h" 13 #include "ui/gfx/size.h"
14 #include "ui/views/views_export.h" 14 #include "ui/views/controls/webview/webview_export.h"
15 #include "ui/views/widget/widget_delegate.h" 15 #include "ui/views/widget/widget_delegate.h"
16 #include "ui/views/window/client_view.h" 16 #include "ui/views/window/client_view.h"
17 #include "ui/web_dialogs/web_dialog_delegate.h" 17 #include "ui/web_dialogs/web_dialog_delegate.h"
18 #include "ui/web_dialogs/web_dialog_web_contents_delegate.h" 18 #include "ui/web_dialogs/web_dialog_web_contents_delegate.h"
19 19
20 namespace content { 20 namespace content {
21 class BrowserContext; 21 class BrowserContext;
22 } 22 }
23 23
24 namespace views { 24 namespace views {
25 class WebView; 25 class WebView;
26 26
27 //////////////////////////////////////////////////////////////////////////////// 27 ////////////////////////////////////////////////////////////////////////////////
28 // 28 //
29 // WebDialogView is a view used to display an web dialog to the user. The 29 // WebDialogView is a view used to display an web dialog to the user. The
30 // content of the dialogs is determined by the delegate 30 // content of the dialogs is determined by the delegate
31 // (ui::WebDialogDelegate), but is basically a file URL along with a 31 // (ui::WebDialogDelegate), but is basically a file URL along with a
32 // JSON input string. The HTML is supposed to show a UI to the user and is 32 // JSON input string. The HTML is supposed to show a UI to the user and is
33 // expected to send back a JSON file as a return value. 33 // expected to send back a JSON file as a return value.
34 // 34 //
35 //////////////////////////////////////////////////////////////////////////////// 35 ////////////////////////////////////////////////////////////////////////////////
36 // 36 //
37 // TODO(akalin): Make WebDialogView contain an WebDialogWebContentsDelegate 37 // TODO(akalin): Make WebDialogView contain an WebDialogWebContentsDelegate
38 // instead of inheriting from it to avoid violating the "no multiple 38 // instead of inheriting from it to avoid violating the "no multiple
39 // inheritance" rule. 39 // inheritance" rule.
40 class VIEWS_EXPORT WebDialogView : public views::ClientView, 40 class WEBVIEW_EXPORT WebDialogView : public views::ClientView,
41 public ui::WebDialogWebContentsDelegate, 41 public ui::WebDialogWebContentsDelegate,
42 public ui::WebDialogDelegate, 42 public ui::WebDialogDelegate,
43 public views::WidgetDelegate { 43 public views::WidgetDelegate {
44 public: 44 public:
45 // |handler| must not be NULL and this class takes the ownership. 45 // |handler| must not be NULL and this class takes the ownership.
46 WebDialogView(content::BrowserContext* context, 46 WebDialogView(content::BrowserContext* context,
47 ui::WebDialogDelegate* delegate, 47 ui::WebDialogDelegate* delegate,
48 WebContentsHandler* handler); 48 WebContentsHandler* handler);
49 virtual ~WebDialogView(); 49 virtual ~WebDialogView();
50 50
51 // For testing. 51 // For testing.
52 content::WebContents* web_contents(); 52 content::WebContents* web_contents();
53 53
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 ui::WebDialogDelegate* delegate_; 127 ui::WebDialogDelegate* delegate_;
128 128
129 views::WebView* web_view_; 129 views::WebView* web_view_;
130 130
131 DISALLOW_COPY_AND_ASSIGN(WebDialogView); 131 DISALLOW_COPY_AND_ASSIGN(WebDialogView);
132 }; 132 };
133 133
134 } // namespace views 134 } // namespace views
135 135
136 #endif // UI_VIEWS_CONTROLS_WEBVIEW_WEB_DIALOG_VIEW_H_ 136 #endif // UI_VIEWS_CONTROLS_WEBVIEW_WEB_DIALOG_VIEW_H_
OLDNEW
« no previous file with comments | « content/content_shell.gypi ('k') | ui/views/controls/webview/webview.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698