OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #include <gtk/gtk.h> | 5 #include <gtk/gtk.h> |
6 | 6 |
7 #include "webkit/tools/test_shell/webview_host.h" | 7 #include "webkit/tools/test_shell/webview_host.h" |
8 | 8 |
9 #include "base/gfx/platform_canvas.h" | 9 #include "base/gfx/platform_canvas.h" |
10 #include "base/gfx/rect.h" | 10 #include "base/gfx/rect.h" |
11 #include "base/gfx/size.h" | 11 #include "base/gfx/size.h" |
12 #include "webkit/glue/webinputevent.h" | 12 #include "webkit/glue/webinputevent.h" |
13 #include "webkit/glue/webview.h" | 13 #include "webkit/glue/webview.h" |
14 | 14 |
15 /*static*/ | 15 /*static*/ |
16 WebViewHost* WebViewHost::Create(GtkWidget* parent_window, | 16 WebViewHost* WebViewHost::Create(GtkWidget* box, |
17 WebViewDelegate* delegate, | 17 WebViewDelegate* delegate, |
18 const WebPreferences& prefs) { | 18 const WebPreferences& prefs) { |
19 WebViewHost* host = new WebViewHost(); | 19 // TODO(agl): |
| 20 // /usr/local/google/agl/src/chrome/src/webkit/tools/test_shell/gtk/webview_ho
st.cc:19: error: no matching function for call to 'WebWidgetHost::Create(GtkWidg
et*&, WebViewDelegate*&)' |
| 21 WebViewHost* host = reinterpret_cast<WebViewHost *>(WebWidgetHost::Create(box,
NULL)); |
20 | 22 |
21 // TODO(erg): | 23 // TODO(erg): |
22 // - Set "host->view_" | 24 // - Set "host->view_" |
23 // - Call "host->webwidget_->Resize" | 25 // - Call "host->webwidget_->Resize" |
24 host->webwidget_ = WebView::Create(delegate, prefs); | 26 host->webwidget_ = WebView::Create(delegate, prefs); |
| 27 host->webwidget_->Resize(gfx::Size(640, 480)); |
| 28 host->webwidget_->Layout(); |
25 | 29 |
26 return host; | 30 return host; |
27 } | 31 } |
28 | 32 |
29 WebView* WebViewHost::webview() const { | 33 WebView* WebViewHost::webview() const { |
30 return static_cast<WebView*>(webwidget_); | 34 return static_cast<WebView*>(webwidget_); |
31 } | 35 } |
OLD | NEW |