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

Side by Side Diff: webkit/tools/test_shell/gtk/webview_host.cc

Issue 9735: test_webview_delegate.cc was forked for the Mac test shell, and then (Closed)
Patch Set: Created 12 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
OLDNEW
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 "base/logging.h" 12 #include "base/logging.h"
13 #include "webkit/glue/webinputevent.h" 13 #include "webkit/glue/webinputevent.h"
14 #include "webkit/glue/webview.h" 14 #include "webkit/glue/webview.h"
15 15
16 /*static*/ 16 /*static*/
17 WebViewHost* WebViewHost::Create(GtkWidget* box, 17 WebViewHost* WebViewHost::Create(GtkWidget* box,
18 WebViewDelegate* delegate, 18 WebViewDelegate* delegate,
19 const WebPreferences& prefs) { 19 const WebPreferences& prefs) {
20 WebViewHost* host = new WebViewHost(); 20 WebViewHost* host = new WebViewHost();
21 21
22 LOG(INFO) << "In WebViewHost::Create";
23
24 host->view_ = WebWidgetHost::CreateWindow(box, host); 22 host->view_ = WebWidgetHost::CreateWindow(box, host);
25 g_object_set_data(G_OBJECT(host->view_), "webwidgethost", host); 23 g_object_set_data(G_OBJECT(host->view_), "webwidgethost", host);
26 24
27 host->webwidget_ = WebView::Create(delegate, prefs); 25 host->webwidget_ = WebView::Create(delegate, prefs);
28 host->webwidget_->Layout(); 26 host->webwidget_->Layout();
29 27
30 return host; 28 return host;
31 } 29 }
32 30
33 WebView* WebViewHost::webview() const { 31 WebView* WebViewHost::webview() const {
34 return static_cast<WebView*>(webwidget_); 32 return static_cast<WebView*>(webwidget_);
35 } 33 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698