| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/browser/webkit_test_controller.h" | 5 #include "content/shell/browser/webkit_test_controller.h" |
| 6 | 6 |
| 7 #include <iostream> | 7 #include <iostream> |
| 8 | 8 |
| 9 #include "base/base64.h" | 9 #include "base/base64.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 browser_context, | 251 browser_context, |
| 252 GURL(), | 252 GURL(), |
| 253 NULL, | 253 NULL, |
| 254 MSG_ROUTING_NONE, | 254 MSG_ROUTING_NONE, |
| 255 initial_size_); | 255 initial_size_); |
| 256 WebContentsObserver::Observe(main_window_->web_contents()); | 256 WebContentsObserver::Observe(main_window_->web_contents()); |
| 257 send_configuration_to_next_host_ = true; | 257 send_configuration_to_next_host_ = true; |
| 258 current_pid_ = base::kNullProcessId; | 258 current_pid_ = base::kNullProcessId; |
| 259 main_window_->LoadURL(test_url); | 259 main_window_->LoadURL(test_url); |
| 260 } else { | 260 } else { |
| 261 #if defined(TOOLKIT_GTK) || defined(OS_MACOSX) | 261 #if defined(OS_MACOSX) |
| 262 // Shell::SizeTo is not implemented on all platforms. | 262 // Shell::SizeTo is not implemented on all platforms. |
| 263 main_window_->SizeTo(initial_size_); | 263 main_window_->SizeTo(initial_size_); |
| 264 #endif | 264 #endif |
| 265 main_window_->web_contents()->GetRenderViewHost()->GetView() | 265 main_window_->web_contents()->GetRenderViewHost()->GetView() |
| 266 ->SetSize(initial_size_); | 266 ->SetSize(initial_size_); |
| 267 main_window_->web_contents()->GetRenderViewHost()->WasResized(); | 267 main_window_->web_contents()->GetRenderViewHost()->WasResized(); |
| 268 RenderViewHost* render_view_host = | 268 RenderViewHost* render_view_host = |
| 269 main_window_->web_contents()->GetRenderViewHost(); | 269 main_window_->web_contents()->GetRenderViewHost(); |
| 270 WebPreferences prefs = render_view_host->GetWebkitPreferences(); | 270 WebPreferences prefs = render_view_host->GetWebkitPreferences(); |
| 271 OverrideWebkitPrefs(&prefs); | 271 OverrideWebkitPrefs(&prefs); |
| (...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 671 return; | 671 return; |
| 672 } | 672 } |
| 673 | 673 |
| 674 printer_->AddErrorMessage( | 674 printer_->AddErrorMessage( |
| 675 base::StringPrintf("#LEAK - renderer pid %d (%s)", current_pid_, | 675 base::StringPrintf("#LEAK - renderer pid %d (%s)", current_pid_, |
| 676 result.detail.c_str())); | 676 result.detail.c_str())); |
| 677 DiscardMainWindow(); | 677 DiscardMainWindow(); |
| 678 } | 678 } |
| 679 | 679 |
| 680 } // namespace content | 680 } // namespace content |
| OLD | NEW |