OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/shell/renderer/shell_render_process_observer.h" | 5 #include "content/shell/renderer/shell_render_process_observer.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "content/public/common/content_client.h" | 8 #include "content/public/common/content_client.h" |
9 #include "content/public/renderer/render_thread.h" | 9 #include "content/public/renderer/render_thread.h" |
10 #include "content/public/renderer/render_view.h" | 10 #include "content/public/renderer/render_view.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 } | 34 } |
35 | 35 |
36 ShellRenderProcessObserver::ShellRenderProcessObserver() | 36 ShellRenderProcessObserver::ShellRenderProcessObserver() |
37 : main_test_runner_(NULL), | 37 : main_test_runner_(NULL), |
38 test_delegate_(NULL) { | 38 test_delegate_(NULL) { |
39 CHECK(!g_instance); | 39 CHECK(!g_instance); |
40 g_instance = this; | 40 g_instance = this; |
41 RenderThread::Get()->AddObserver(this); | 41 RenderThread::Get()->AddObserver(this); |
42 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) | 42 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) |
43 return; | 43 return; |
44 DisableAppCacheLogging(); | 44 EnableRendererLayoutTestMode(); |
45 EnableDevToolsFrontendTesting(); | |
46 EnableShortCircuitSizeUpdates(); | |
47 DoNotSendFocusEvents(); | |
48 DisableNavigationErrorPages(); | |
49 } | 45 } |
50 | 46 |
51 ShellRenderProcessObserver::~ShellRenderProcessObserver() { | 47 ShellRenderProcessObserver::~ShellRenderProcessObserver() { |
52 CHECK(g_instance == this); | 48 CHECK(g_instance == this); |
53 g_instance = NULL; | 49 g_instance = NULL; |
54 } | 50 } |
55 | 51 |
56 void ShellRenderProcessObserver::SetTestDelegate(WebTestDelegate* delegate) { | 52 void ShellRenderProcessObserver::SetTestDelegate(WebTestDelegate* delegate) { |
57 test_interfaces_->setDelegate(delegate); | 53 test_interfaces_->setDelegate(delegate); |
58 test_delegate_ = delegate; | 54 test_delegate_ = delegate; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 webkit_source_dir_ = webkit_source_dir; | 90 webkit_source_dir_ = webkit_source_dir; |
95 } | 91 } |
96 | 92 |
97 void ShellRenderProcessObserver::OnLoadHyphenDictionary( | 93 void ShellRenderProcessObserver::OnLoadHyphenDictionary( |
98 const IPC::PlatformFileForTransit& dict_file) { | 94 const IPC::PlatformFileForTransit& dict_file) { |
99 ShellContentRendererClient::Get()->LoadHyphenDictionary( | 95 ShellContentRendererClient::Get()->LoadHyphenDictionary( |
100 IPC::PlatformFileForTransitToPlatformFile(dict_file)); | 96 IPC::PlatformFileForTransitToPlatformFile(dict_file)); |
101 } | 97 } |
102 | 98 |
103 } // namespace content | 99 } // namespace content |
OLD | NEW |