OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-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 #include <gtk/gtk.h> | 5 #include <gtk/gtk.h> |
6 | 6 |
7 #include "base/at_exit.h" | 7 #include "base/at_exit.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/icu_util.h" | 10 #include "base/icu_util.h" |
11 #include "base/path_service.h" | 11 #include "base/path_service.h" |
12 #include "base/string_util.h" | 12 #include "base/string_util.h" |
| 13 #include "base/message_loop.h" |
13 #include "webkit/tools/test_shell/test_shell.h" | 14 #include "webkit/tools/test_shell/test_shell.h" |
14 #include "webkit/tools/test_shell/test_shell_switches.h" | 15 #include "webkit/tools/test_shell/test_shell_switches.h" |
15 | 16 |
16 // TODO(port): This file is intended to match test_shell_main.cc. | 17 // TODO(port): This file is intended to match test_shell_main.cc. |
17 // Remerge this back into test_shell_main once we have enough supporting pieces | 18 // Remerge this back into test_shell_main once we have enough supporting pieces |
18 // in place. | 19 // in place. |
19 | 20 |
20 int main(int argc, char* argv[]) { | 21 int main(int argc, char* argv[]) { |
21 // Make Singletons work. | 22 // Make Singletons work. |
22 base::AtExitManager at_exit_manager; | 23 base::AtExitManager at_exit_manager; |
(...skipping 23 matching lines...) Expand all Loading... |
46 file_util::AppendToPath(&uri, L"test_shell"); | 47 file_util::AppendToPath(&uri, L"test_shell"); |
47 file_util::AppendToPath(&uri, L"index.html"); | 48 file_util::AppendToPath(&uri, L"index.html"); |
48 } | 49 } |
49 | 50 |
50 if (parsed_command_line.GetLooseValueCount() > 0) { | 51 if (parsed_command_line.GetLooseValueCount() > 0) { |
51 CommandLine::LooseValueIterator iter = | 52 CommandLine::LooseValueIterator iter = |
52 parsed_command_line.GetLooseValuesBegin(); | 53 parsed_command_line.GetLooseValuesBegin(); |
53 uri = *iter; | 54 uri = *iter; |
54 } | 55 } |
55 | 56 |
| 57 MessageLoopForUI main_message_loop; |
| 58 |
56 TestShell* shell; | 59 TestShell* shell; |
57 if (TestShell::CreateNewWindow(uri, &shell)) { | 60 if (TestShell::CreateNewWindow(uri, &shell)) { |
58 // TODO(port): the rest of this. :) | 61 // TODO(port): the rest of this. :) |
59 } | 62 } |
60 | 63 |
61 // TODO(port): use MessageLoop instead. | 64 main_message_loop.Run(); |
62 gtk_main(); | |
63 | 65 |
64 return 0; | 66 return 0; |
65 } | 67 } |
OLD | NEW |