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

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

Issue 8588068: GTK: Create the start of a compatibility header wrapping deprecated methods. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase to ToT and remove views/ cleanups. Created 9 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
« no previous file with comments | « webkit/plugins/npapi/webplugin_delegate_impl_gtk.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "webkit/tools/test_shell/test_shell.h" 5 #include "webkit/tools/test_shell/test_shell.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <fontconfig/fontconfig.h> 9 #include <fontconfig/fontconfig.h>
10 #include <gtk/gtk.h> 10 #include <gtk/gtk.h>
11 #include <signal.h> 11 #include <signal.h>
12 #include <unistd.h> 12 #include <unistd.h>
13 13
14 #include "base/file_path.h" 14 #include "base/file_path.h"
15 #include "base/file_util.h" 15 #include "base/file_util.h"
16 #include "base/message_loop.h" 16 #include "base/message_loop.h"
17 #include "base/path_service.h" 17 #include "base/path_service.h"
18 #include "base/string16.h" 18 #include "base/string16.h"
19 #include "base/string_piece.h" 19 #include "base/string_piece.h"
20 #include "base/utf_string_conversions.h" 20 #include "base/utf_string_conversions.h"
21 #include "grit/test_shell_resources.h" 21 #include "grit/test_shell_resources.h"
22 #include "grit/webkit_resources.h" 22 #include "grit/webkit_resources.h"
23 #include "net/base/mime_util.h" 23 #include "net/base/mime_util.h"
24 #include "net/base/net_util.h" 24 #include "net/base/net_util.h"
25 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" 25 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
26 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPoint.h" 26 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPoint.h"
27 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" 27 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
28 #include "ui/base/gtk/gtk_compat.h"
28 #include "ui/base/resource/resource_bundle.h" 29 #include "ui/base/resource/resource_bundle.h"
29 #include "webkit/glue/resource_loader_bridge.h" 30 #include "webkit/glue/resource_loader_bridge.h"
30 #include "webkit/glue/webkit_glue.h" 31 #include "webkit/glue/webkit_glue.h"
31 #include "webkit/glue/webpreferences.h" 32 #include "webkit/glue/webpreferences.h"
32 #include "webkit/plugins/npapi/plugin_list.h" 33 #include "webkit/plugins/npapi/plugin_list.h"
33 #include "webkit/tools/test_shell/test_navigation_controller.h" 34 #include "webkit/tools/test_shell/test_navigation_controller.h"
34 #include "webkit/tools/test_shell/test_webview_delegate.h" 35 #include "webkit/tools/test_shell/test_webview_delegate.h"
35 36
36 using WebKit::WebPoint; 37 using WebKit::WebPoint;
37 using WebKit::WebWidget; 38 using WebKit::WebWidget;
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 signal(SIGALRM, SIG_DFL); 425 signal(SIGALRM, SIG_DFL);
425 } 426 }
426 427
427 void TestShell::InteractiveSetFocus(WebWidgetHost* host, bool enable) { 428 void TestShell::InteractiveSetFocus(WebWidgetHost* host, bool enable) {
428 GtkWidget* widget = GTK_WIDGET(host->view_handle()); 429 GtkWidget* widget = GTK_WIDGET(host->view_handle());
429 430
430 if (enable) { 431 if (enable) {
431 gtk_widget_grab_focus(widget); 432 gtk_widget_grab_focus(widget);
432 } else if (gtk_widget_is_focus(widget)) { 433 } else if (gtk_widget_is_focus(widget)) {
433 GtkWidget *toplevel = gtk_widget_get_toplevel(widget); 434 GtkWidget *toplevel = gtk_widget_get_toplevel(widget);
434 if (GTK_WIDGET_TOPLEVEL(toplevel)) 435 if (gtk_widget_is_toplevel(toplevel))
435 gtk_window_set_focus(GTK_WINDOW(toplevel), NULL); 436 gtk_window_set_focus(GTK_WINDOW(toplevel), NULL);
436 } 437 }
437 } 438 }
438 439
439 void TestShell::DestroyWindow(gfx::NativeWindow windowHandle) { 440 void TestShell::DestroyWindow(gfx::NativeWindow windowHandle) {
440 RemoveWindowFromList(windowHandle); 441 RemoveWindowFromList(windowHandle);
441 gtk_widget_destroy(GTK_WIDGET(windowHandle)); 442 gtk_widget_destroy(GTK_WIDGET(windowHandle));
442 } 443 }
443 444
444 WebWidget* TestShell::CreatePopupWidget() { 445 WebWidget* TestShell::CreatePopupWidget() {
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 resource_id = IDR_BROKENIMAGE_TESTSHELL; 574 resource_id = IDR_BROKENIMAGE_TESTSHELL;
574 break; 575 break;
575 case IDR_TEXTAREA_RESIZER: 576 case IDR_TEXTAREA_RESIZER:
576 resource_id = IDR_TEXTAREA_RESIZER_TESTSHELL; 577 resource_id = IDR_TEXTAREA_RESIZER_TESTSHELL;
577 break; 578 break;
578 } 579 }
579 return TestShell::ResourceProvider(resource_id); 580 return TestShell::ResourceProvider(resource_id);
580 } 581 }
581 582
582 } // namespace webkit_glue 583 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/plugins/npapi/webplugin_delegate_impl_gtk.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698