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

Side by Side Diff: webkit/tools/test_shell/test_webview_delegate_gtk.cc

Issue 48149: Use cocoa controls for HTML select popups in test_shell (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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
OLDNEW
1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 // This file was forked off the Mac port. 5 // This file was forked off the Mac port.
6 6
7 #include "webkit/tools/test_shell/test_webview_delegate.h" 7 #include "webkit/tools/test_shell/test_webview_delegate.h"
8 8
9 #include <gtk/gtk.h> 9 #include <gtk/gtk.h>
10 10
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 106
107 void TestWebViewDelegate::Show(WebWidget* webwidget, 107 void TestWebViewDelegate::Show(WebWidget* webwidget,
108 WindowOpenDisposition disposition) { 108 WindowOpenDisposition disposition) {
109 WebWidgetHost* host = GetHostForWidget(webwidget); 109 WebWidgetHost* host = GetHostForWidget(webwidget);
110 GtkWidget* drawing_area = host->view_handle(); 110 GtkWidget* drawing_area = host->view_handle();
111 GtkWidget* window = 111 GtkWidget* window =
112 gtk_widget_get_parent(gtk_widget_get_parent(drawing_area)); 112 gtk_widget_get_parent(gtk_widget_get_parent(drawing_area));
113 gtk_widget_show_all(window); 113 gtk_widget_show_all(window);
114 } 114 }
115 115
116 void TestWebViewDelegate::ShowWithItems(WebWidget* webwidget,
117 const gfx::Rect& bounds,
118 int item_height,
119 int selected_index,
120 const std::vector<MenuItem>& items) {
121 NOTIMPLEMENTED();
122 }
123
116 void TestWebViewDelegate::CloseWidgetSoon(WebWidget* webwidget) { 124 void TestWebViewDelegate::CloseWidgetSoon(WebWidget* webwidget) {
117 if (webwidget == shell_->webView()) { 125 if (webwidget == shell_->webView()) {
118 MessageLoop::current()->PostTask(FROM_HERE, NewRunnableFunction( 126 MessageLoop::current()->PostTask(FROM_HERE, NewRunnableFunction(
119 &gtk_widget_destroy, GTK_WIDGET(shell_->mainWnd()))); 127 &gtk_widget_destroy, GTK_WIDGET(shell_->mainWnd())));
120 } else if (webwidget == shell_->popup()) { 128 } else if (webwidget == shell_->popup()) {
121 shell_->ClosePopup(); 129 shell_->ClosePopup();
122 } 130 }
123 } 131 }
124 132
125 void TestWebViewDelegate::SetCursor(WebWidget* webwidget, 133 void TestWebViewDelegate::SetCursor(WebWidget* webwidget,
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 // Private methods ----------------------------------------------------------- 260 // Private methods -----------------------------------------------------------
253 261
254 void TestWebViewDelegate::SetPageTitle(const std::wstring& title) { 262 void TestWebViewDelegate::SetPageTitle(const std::wstring& title) {
255 gtk_window_set_title(GTK_WINDOW(shell_->mainWnd()), 263 gtk_window_set_title(GTK_WINDOW(shell_->mainWnd()),
256 ("Test Shell - " + WideToUTF8(title)).c_str()); 264 ("Test Shell - " + WideToUTF8(title)).c_str());
257 } 265 }
258 266
259 void TestWebViewDelegate::SetAddressBarURL(const GURL& url) { 267 void TestWebViewDelegate::SetAddressBarURL(const GURL& url) {
260 gtk_entry_set_text(GTK_ENTRY(shell_->editWnd()), url.spec().c_str()); 268 gtk_entry_set_text(GTK_ENTRY(shell_->editWnd()), url.spec().c_str());
261 } 269 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698