| 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/shell_render_process_observer.h" | 5 #include "content/shell/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_view.h" | 9 #include "content/public/renderer/render_view.h" |
| 10 #include "content/public/renderer/render_thread.h" | 10 #include "content/public/renderer/render_thread.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 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 DisableAppCacheLogging(); |
| 45 EnableDevToolsFrontendTesting(); | 45 EnableDevToolsFrontendTesting(); |
| 46 EnableShortCircuitSizeUpdates(); | 46 EnableShortCircuitSizeUpdates(); |
| 47 DoNotSendFocusEvents(); | 47 DoNotSendFocusEvents(); |
| 48 DisableNavigationErrorPages(); |
| 48 } | 49 } |
| 49 | 50 |
| 50 ShellRenderProcessObserver::~ShellRenderProcessObserver() { | 51 ShellRenderProcessObserver::~ShellRenderProcessObserver() { |
| 51 CHECK(g_instance == this); | 52 CHECK(g_instance == this); |
| 52 g_instance = NULL; | 53 g_instance = NULL; |
| 53 } | 54 } |
| 54 | 55 |
| 55 void ShellRenderProcessObserver::SetTestDelegate(WebTestDelegate* delegate) { | 56 void ShellRenderProcessObserver::SetTestDelegate(WebTestDelegate* delegate) { |
| 56 test_interfaces_->setDelegate(delegate); | 57 test_interfaces_->setDelegate(delegate); |
| 57 test_delegate_ = delegate; | 58 test_delegate_ = delegate; |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 void ShellRenderProcessObserver::OnLoadHyphenDictionary( | 104 void ShellRenderProcessObserver::OnLoadHyphenDictionary( |
| 104 const IPC::PlatformFileForTransit& dict_file) { | 105 const IPC::PlatformFileForTransit& dict_file) { |
| 105 ShellContentRendererClient* renderer_client = | 106 ShellContentRendererClient* renderer_client = |
| 106 static_cast<content::ShellContentRendererClient*>( | 107 static_cast<content::ShellContentRendererClient*>( |
| 107 content::GetContentClient()->renderer()); | 108 content::GetContentClient()->renderer()); |
| 108 renderer_client->LoadHyphenDictionary( | 109 renderer_client->LoadHyphenDictionary( |
| 109 IPC::PlatformFileForTransitToPlatformFile(dict_file)); | 110 IPC::PlatformFileForTransitToPlatformFile(dict_file)); |
| 110 } | 111 } |
| 111 | 112 |
| 112 } // namespace content | 113 } // namespace content |
| OLD | NEW |