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

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

Issue 67018: Chrome side of the WebKit popup changes. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 8 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 108
109 void TestWebViewDelegate::Show(WebWidget* webwidget, 109 void TestWebViewDelegate::Show(WebWidget* webwidget,
110 WindowOpenDisposition disposition) { 110 WindowOpenDisposition disposition) {
111 WebWidgetHost* host = GetHostForWidget(webwidget); 111 WebWidgetHost* host = GetHostForWidget(webwidget);
112 GtkWidget* drawing_area = host->view_handle(); 112 GtkWidget* drawing_area = host->view_handle();
113 GtkWidget* window = 113 GtkWidget* window =
114 gtk_widget_get_parent(gtk_widget_get_parent(drawing_area)); 114 gtk_widget_get_parent(gtk_widget_get_parent(drawing_area));
115 gtk_widget_show_all(window); 115 gtk_widget_show_all(window);
116 } 116 }
117 117
118 void TestWebViewDelegate::ShowWithItems(WebWidget* webwidget, 118 void TestWebViewDelegate::ShowAsPopupWithItems(
119 const WebRect& bounds, 119 WebWidget* webwidget,
120 int item_height, 120 const WebRect& bounds,
121 int selected_index, 121 int item_height,
122 const std::vector<MenuItem>& items) { 122 int selected_index,
123 NOTIMPLEMENTED(); 123 const std::vector<WebMenuItem>& items) {
124 NOTREACHED();
124 } 125 }
125 126
126 void TestWebViewDelegate::CloseWidgetSoon(WebWidget* webwidget) { 127 void TestWebViewDelegate::CloseWidgetSoon(WebWidget* webwidget) {
127 if (webwidget == shell_->webView()) { 128 if (webwidget == shell_->webView()) {
128 MessageLoop::current()->PostTask(FROM_HERE, NewRunnableFunction( 129 MessageLoop::current()->PostTask(FROM_HERE, NewRunnableFunction(
129 &gtk_widget_destroy, GTK_WIDGET(shell_->mainWnd()))); 130 &gtk_widget_destroy, GTK_WIDGET(shell_->mainWnd())));
130 } else if (webwidget == shell_->popup()) { 131 } else if (webwidget == shell_->popup()) {
131 shell_->ClosePopup(); 132 shell_->ClosePopup();
132 } 133 }
133 } 134 }
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 // Private methods ----------------------------------------------------------- 269 // Private methods -----------------------------------------------------------
269 270
270 void TestWebViewDelegate::SetPageTitle(const std::wstring& title) { 271 void TestWebViewDelegate::SetPageTitle(const std::wstring& title) {
271 gtk_window_set_title(GTK_WINDOW(shell_->mainWnd()), 272 gtk_window_set_title(GTK_WINDOW(shell_->mainWnd()),
272 ("Test Shell - " + WideToUTF8(title)).c_str()); 273 ("Test Shell - " + WideToUTF8(title)).c_str());
273 } 274 }
274 275
275 void TestWebViewDelegate::SetAddressBarURL(const GURL& url) { 276 void TestWebViewDelegate::SetAddressBarURL(const GURL& url) {
276 gtk_entry_set_text(GTK_ENTRY(shell_->editWnd()), url.spec().c_str()); 277 gtk_entry_set_text(GTK_ENTRY(shell_->editWnd()), url.spec().c_str());
277 } 278 }
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