| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "chrome/browser/renderer_host/test_render_view_host.h" | 5 #include "chrome/browser/renderer_host/test_render_view_host.h" |
| 6 #include "chrome/browser/tab_contents/test_web_contents.h" | 6 #include "chrome/browser/tab_contents/test_web_contents.h" |
| 7 #include "chrome/common/render_messages.h" |
| 7 | 8 |
| 8 TestRenderViewHost::TestRenderViewHost(SiteInstance* instance, | 9 TestRenderViewHost::TestRenderViewHost(SiteInstance* instance, |
| 9 RenderViewHostDelegate* delegate, | 10 RenderViewHostDelegate* delegate, |
| 10 int routing_id, | 11 int routing_id, |
| 11 base::WaitableEvent* modal_dialog_event) | 12 base::WaitableEvent* modal_dialog_event) |
| 12 : RenderViewHost(instance, delegate, routing_id, modal_dialog_event), | 13 : RenderViewHost(instance, delegate, routing_id, modal_dialog_event), |
| 13 render_view_created_(false), | 14 render_view_created_(false), |
| 14 delete_counter_(NULL) { | 15 delete_counter_(NULL) { |
| 15 set_view(new TestRenderWidgetHostView()); | 16 set_view(new TestRenderWidgetHostView()); |
| 16 } | 17 } |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 if (contents_) { | 77 if (contents_) { |
| 77 contents_->CloseContents(); | 78 contents_->CloseContents(); |
| 78 contents_ = NULL; | 79 contents_ = NULL; |
| 79 } | 80 } |
| 80 controller_ = NULL; | 81 controller_ = NULL; |
| 81 | 82 |
| 82 // Make sure that we flush any messages related to WebContents destruction | 83 // Make sure that we flush any messages related to WebContents destruction |
| 83 // before we destroy the profile. | 84 // before we destroy the profile. |
| 84 MessageLoop::current()->RunAllPending(); | 85 MessageLoop::current()->RunAllPending(); |
| 85 } | 86 } |
| OLD | NEW |