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

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

Issue 155378: Replace ShowAsPopupWithItems to CreatePopupWidgetWithInfo. Also,... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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 #include <gdk/gdkx.h> 10 #include <gdk/gdkx.h>
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 121
122 void TestWebViewDelegate::Show(WebWidget* webwidget, 122 void TestWebViewDelegate::Show(WebWidget* webwidget,
123 WindowOpenDisposition disposition) { 123 WindowOpenDisposition disposition) {
124 WebWidgetHost* host = GetHostForWidget(webwidget); 124 WebWidgetHost* host = GetHostForWidget(webwidget);
125 GtkWidget* drawing_area = host->view_handle(); 125 GtkWidget* drawing_area = host->view_handle();
126 GtkWidget* window = 126 GtkWidget* window =
127 gtk_widget_get_parent(gtk_widget_get_parent(drawing_area)); 127 gtk_widget_get_parent(gtk_widget_get_parent(drawing_area));
128 gtk_widget_show_all(window); 128 gtk_widget_show_all(window);
129 } 129 }
130 130
131 void TestWebViewDelegate::ShowAsPopupWithItems(
132 WebWidget* webwidget,
133 const WebRect& bounds,
134 int item_height,
135 int selected_index,
136 const std::vector<WebMenuItem>& items) {
137 NOTREACHED();
138 }
139
140 void TestWebViewDelegate::CloseWidgetSoon(WebWidget* webwidget) { 131 void TestWebViewDelegate::CloseWidgetSoon(WebWidget* webwidget) {
141 if (webwidget == shell_->webView()) { 132 if (webwidget == shell_->webView()) {
142 MessageLoop::current()->PostTask(FROM_HERE, NewRunnableFunction( 133 MessageLoop::current()->PostTask(FROM_HERE, NewRunnableFunction(
143 &gtk_widget_destroy, GTK_WIDGET(shell_->mainWnd()))); 134 &gtk_widget_destroy, GTK_WIDGET(shell_->mainWnd())));
144 } else if (webwidget == shell_->popup()) { 135 } else if (webwidget == shell_->popup()) {
145 shell_->ClosePopup(); 136 shell_->ClosePopup();
146 } 137 }
147 } 138 }
148 139
149 void TestWebViewDelegate::SetCursor(WebWidget* webwidget, 140 void TestWebViewDelegate::SetCursor(WebWidget* webwidget,
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 // Private methods ----------------------------------------------------------- 256 // Private methods -----------------------------------------------------------
266 257
267 void TestWebViewDelegate::SetPageTitle(const std::wstring& title) { 258 void TestWebViewDelegate::SetPageTitle(const std::wstring& title) {
268 gtk_window_set_title(GTK_WINDOW(shell_->mainWnd()), 259 gtk_window_set_title(GTK_WINDOW(shell_->mainWnd()),
269 ("Test Shell - " + WideToUTF8(title)).c_str()); 260 ("Test Shell - " + WideToUTF8(title)).c_str());
270 } 261 }
271 262
272 void TestWebViewDelegate::SetAddressBarURL(const GURL& url) { 263 void TestWebViewDelegate::SetAddressBarURL(const GURL& url) {
273 gtk_entry_set_text(GTK_ENTRY(shell_->editWnd()), url.spec().c_str()); 264 gtk_entry_set_text(GTK_ENTRY(shell_->editWnd()), url.spec().c_str());
274 } 265 }
OLDNEW
« no previous file with comments | « webkit/tools/test_shell/test_webview_delegate.h ('k') | webkit/tools/test_shell/test_webview_delegate_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698