OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/browser/tab_contents/test_tab_contents.h" | 5 #include "content/browser/tab_contents/test_tab_contents.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
| 9 #include "chrome/browser/profiles/profile.h" |
9 #include "content/browser/browser_url_handler.h" | 10 #include "content/browser/browser_url_handler.h" |
10 #include "content/browser/renderer_host/mock_render_process_host.h" | 11 #include "content/browser/renderer_host/mock_render_process_host.h" |
11 #include "content/browser/renderer_host/render_view_host.h" | 12 #include "content/browser/renderer_host/render_view_host.h" |
12 #include "content/browser/renderer_host/test_render_view_host.h" | 13 #include "content/browser/renderer_host/test_render_view_host.h" |
13 #include "content/browser/site_instance.h" | 14 #include "content/browser/site_instance.h" |
14 #include "content/common/page_transition_types.h" | 15 #include "content/common/page_transition_types.h" |
15 | 16 |
16 TestTabContents::TestTabContents(Profile* profile, SiteInstance* instance) | 17 TestTabContents::TestTabContents(Profile* profile, SiteInstance* instance) |
17 : TabContents(profile, instance, MSG_ROUTING_NONE, NULL, NULL), | 18 : TabContents(profile, instance, MSG_ROUTING_NONE, NULL, NULL), |
18 transition_cross_site(false), | 19 transition_cross_site(false), |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 TestRenderViewHost* rvh = static_cast<TestRenderViewHost*>( | 83 TestRenderViewHost* rvh = static_cast<TestRenderViewHost*>( |
83 render_manager_.current_host()); | 84 render_manager_.current_host()); |
84 rvh->SendShouldCloseACK(true); | 85 rvh->SendShouldCloseACK(true); |
85 } | 86 } |
86 | 87 |
87 RenderViewHostDelegate::View* TestTabContents::GetViewDelegate() { | 88 RenderViewHostDelegate::View* TestTabContents::GetViewDelegate() { |
88 if (delegate_view_override_) | 89 if (delegate_view_override_) |
89 return delegate_view_override_; | 90 return delegate_view_override_; |
90 return TabContents::GetViewDelegate(); | 91 return TabContents::GetViewDelegate(); |
91 } | 92 } |
OLD | NEW |