OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/tab_contents/view_source_contents.h" | 5 #include "chrome/browser/tab_contents/view_source_contents.h" |
6 | 6 |
7 #include "chrome/browser/renderer_host/render_view_host.h" | 7 #include "chrome/browser/renderer_host/render_view_host.h" |
8 #include "chrome/browser/tab_contents/navigation_entry.h" | 8 #include "chrome/browser/tab_contents/navigation_entry.h" |
| 9 #include "chrome/common/render_messages.h" |
9 | 10 |
10 ViewSourceContents::ViewSourceContents(Profile* profile, SiteInstance* instance) | 11 ViewSourceContents::ViewSourceContents(Profile* profile, SiteInstance* instance) |
11 : WebContents(profile, instance, NULL, MSG_ROUTING_NONE, NULL) { | 12 : WebContents(profile, instance, NULL, MSG_ROUTING_NONE, NULL) { |
12 set_type(TAB_CONTENTS_VIEW_SOURCE); | 13 set_type(TAB_CONTENTS_VIEW_SOURCE); |
13 } | 14 } |
14 | 15 |
15 void ViewSourceContents::RendererCreated(RenderViewHost* host) { | 16 void ViewSourceContents::RendererCreated(RenderViewHost* host) { |
16 // Make sure the renderer is in view source mode. | 17 // Make sure the renderer is in view source mode. |
17 host->Send(new ViewMsg_EnableViewSourceMode(host->routing_id())); | 18 host->Send(new ViewMsg_EnableViewSourceMode(host->routing_id())); |
18 } | 19 } |
19 | 20 |
OLD | NEW |