OLD | NEW |
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> |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 } | 52 } |
53 | 53 |
54 // GTK callbacks ------------------------------------------------------ | 54 // GTK callbacks ------------------------------------------------------ |
55 | 55 |
56 // Callback for when the main window is destroyed. | 56 // Callback for when the main window is destroyed. |
57 gboolean MainWindowDestroyed(GtkWindow* window, TestShell* shell) { | 57 gboolean MainWindowDestroyed(GtkWindow* window, TestShell* shell) { |
58 TestShell::RemoveWindowFromList(window); | 58 TestShell::RemoveWindowFromList(window); |
59 | 59 |
60 if (TestShell::windowList()->empty() || shell->is_modal()) { | 60 if (TestShell::windowList()->empty() || shell->is_modal()) { |
61 MessageLoop::current()->PostTask(FROM_HERE, | 61 MessageLoop::current()->PostTask(FROM_HERE, |
62 new MessageLoop::QuitTask()); | 62 MessageLoop::QuitClosure()); |
63 } | 63 } |
64 | 64 |
65 delete shell; | 65 delete shell; |
66 | 66 |
67 return FALSE; // Don't stop this message. | 67 return FALSE; // Don't stop this message. |
68 } | 68 } |
69 | 69 |
70 gboolean MainWindowLostFocus(GtkWidget* widget, GdkEventFocus* event, | 70 gboolean MainWindowLostFocus(GtkWidget* widget, GdkEventFocus* event, |
71 TestShell* shell) { | 71 TestShell* shell) { |
72 shell->ClosePopup(); | 72 shell->ClosePopup(); |
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
571 switch (resource_id) { | 571 switch (resource_id) { |
572 case IDR_BROKENIMAGE: | 572 case IDR_BROKENIMAGE: |
573 resource_id = IDR_BROKENIMAGE_TESTSHELL; | 573 resource_id = IDR_BROKENIMAGE_TESTSHELL; |
574 break; | 574 break; |
575 case IDR_TEXTAREA_RESIZER: | 575 case IDR_TEXTAREA_RESIZER: |
576 resource_id = IDR_TEXTAREA_RESIZER_TESTSHELL; | 576 resource_id = IDR_TEXTAREA_RESIZER_TESTSHELL; |
577 break; | 577 break; |
578 } | 578 } |
579 return TestShell::ResourceProvider(resource_id); | 579 return TestShell::ResourceProvider(resource_id); |
580 } | 580 } |
OLD | NEW |