| 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/dom_ui/dom_ui_host.h" | 5 #include "chrome/browser/dom_ui/dom_ui_host.h" |
| 6 | 6 |
| 7 #include "base/json_reader.h" | 7 #include "base/json_reader.h" |
| 8 #include "base/json_writer.h" | 8 #include "base/json_writer.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "chrome/browser/browser.h" | 10 #include "chrome/browser/browser.h" |
| 11 #include "chrome/browser/renderer_host/render_view_host.h" | 11 #include "chrome/browser/renderer_host/render_view_host.h" |
| 12 #include "chrome/browser/tab_contents/navigation_entry.h" | 12 #include "chrome/browser/tab_contents/navigation_entry.h" |
| 13 | 13 |
| 14 DOMUIHost::DOMUIHost(Profile* profile, | 14 DOMUIHost::DOMUIHost(Profile* profile, |
| 15 SiteInstance* instance, | 15 SiteInstance* instance, |
| 16 RenderViewHostFactory* render_view_factory) | 16 RenderViewHostFactory* render_view_factory) |
| 17 : WebContents(profile, | 17 : WebContents(profile, |
| 18 instance, | 18 instance, |
| 19 render_view_factory, | |
| 20 MSG_ROUTING_NONE, | 19 MSG_ROUTING_NONE, |
| 21 NULL) { | 20 NULL) { |
| 22 // Implementors of this class will have a specific tab contents type. | 21 // Implementors of this class will have a specific tab contents type. |
| 23 set_type(TAB_CONTENTS_UNKNOWN_TYPE); | 22 set_type(TAB_CONTENTS_UNKNOWN_TYPE); |
| 24 } | 23 } |
| 25 | 24 |
| 26 DOMUIHost::~DOMUIHost() { | 25 DOMUIHost::~DOMUIHost() { |
| 27 STLDeleteContainerPairSecondPointers(message_callbacks_.begin(), | 26 STLDeleteContainerPairSecondPointers(message_callbacks_.begin(), |
| 28 message_callbacks_.end()); | 27 message_callbacks_.end()); |
| 29 STLDeleteContainerPointers(handlers_.begin(), handlers_.end()); | 28 STLDeleteContainerPointers(handlers_.begin(), handlers_.end()); |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 callback->second->Run(value.get()); | 70 callback->second->Run(value.get()); |
| 72 } | 71 } |
| 73 | 72 |
| 74 WebPreferences DOMUIHost::GetWebkitPrefs() { | 73 WebPreferences DOMUIHost::GetWebkitPrefs() { |
| 75 // Get the users preferences then force image loading to always be on. | 74 // Get the users preferences then force image loading to always be on. |
| 76 WebPreferences web_prefs = WebContents::GetWebkitPrefs(); | 75 WebPreferences web_prefs = WebContents::GetWebkitPrefs(); |
| 77 web_prefs.loads_images_automatically = true; | 76 web_prefs.loads_images_automatically = true; |
| 78 | 77 |
| 79 return web_prefs; | 78 return web_prefs; |
| 80 } | 79 } |
| OLD | NEW |