OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/test_render_view_host.h" | 5 #include "chrome/browser/renderer_host/test/test_render_view_host.h" |
6 | 6 |
7 #include "chrome/browser/browser_url_handler.h" | 7 #include "chrome/browser/browser_url_handler.h" |
8 #include "chrome/browser/renderer_host/test/test_backing_store.h" | 8 #include "chrome/browser/renderer_host/test/test_backing_store.h" |
9 #include "chrome/browser/tab_contents/test_tab_contents.h" | 9 #include "chrome/browser/tab_contents/test_tab_contents.h" |
10 #include "chrome/common/dom_storage_common.h" | 10 #include "chrome/common/dom_storage_common.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 } | 43 } |
44 | 44 |
45 TestRenderViewHost::~TestRenderViewHost() { | 45 TestRenderViewHost::~TestRenderViewHost() { |
46 if (delete_counter_) | 46 if (delete_counter_) |
47 ++*delete_counter_; | 47 ++*delete_counter_; |
48 | 48 |
49 // Since this isn't a traditional view, we have to delete it. | 49 // Since this isn't a traditional view, we have to delete it. |
50 delete view(); | 50 delete view(); |
51 } | 51 } |
52 | 52 |
53 bool TestRenderViewHost::CreateRenderView( | 53 bool TestRenderViewHost::CreateRenderView(const string16& frame_name) { |
54 URLRequestContextGetter* request_context, const string16& frame_name) { | |
55 DCHECK(!render_view_created_); | 54 DCHECK(!render_view_created_); |
56 render_view_created_ = true; | 55 render_view_created_ = true; |
57 process()->ViewCreated(); | 56 process()->ViewCreated(); |
58 return true; | 57 return true; |
59 } | 58 } |
60 | 59 |
61 bool TestRenderViewHost::IsRenderViewLive() const { | 60 bool TestRenderViewHost::IsRenderViewLive() const { |
62 return render_view_created_; | 61 return render_view_created_; |
63 } | 62 } |
64 | 63 |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 contents_.reset(); | 185 contents_.reset(); |
187 | 186 |
188 // Make sure that we flush any messages related to TabContents destruction | 187 // Make sure that we flush any messages related to TabContents destruction |
189 // before we destroy the profile. | 188 // before we destroy the profile. |
190 MessageLoop::current()->RunAllPending(); | 189 MessageLoop::current()->RunAllPending(); |
191 | 190 |
192 // Release the profile on the UI thread. | 191 // Release the profile on the UI thread. |
193 message_loop_.DeleteSoon(FROM_HERE, profile_.release()); | 192 message_loop_.DeleteSoon(FROM_HERE, profile_.release()); |
194 message_loop_.RunAllPending(); | 193 message_loop_.RunAllPending(); |
195 } | 194 } |
OLD | NEW |