Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(222)

Side by Side Diff: chrome/browser/dom_ui/dom_ui_contents.cc

Issue 43010: Fix crash in DOMUIContents::RenderViewCreated (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_contents.h" 5 #include "chrome/browser/dom_ui/dom_ui_contents.h"
6 6
7 #include "chrome/browser/debugger/debugger_contents.h" 7 #include "chrome/browser/debugger/debugger_contents.h"
8 #include "chrome/browser/dom_ui/dev_tools_ui.h" 8 #include "chrome/browser/dom_ui/dev_tools_ui.h"
9 #include "chrome/browser/dom_ui/dom_ui.h" 9 #include "chrome/browser/dom_ui/dom_ui.h"
10 #include "chrome/browser/dom_ui/downloads_ui.h" 10 #include "chrome/browser/dom_ui/downloads_ui.h"
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 WebPreferences DOMUIContents::GetWebkitPrefs() { 167 WebPreferences DOMUIContents::GetWebkitPrefs() {
168 // Get the users preferences then force image loading to always be on. 168 // Get the users preferences then force image loading to always be on.
169 WebPreferences web_prefs = WebContents::GetWebkitPrefs(); 169 WebPreferences web_prefs = WebContents::GetWebkitPrefs();
170 web_prefs.loads_images_automatically = true; 170 web_prefs.loads_images_automatically = true;
171 web_prefs.javascript_enabled = true; 171 web_prefs.javascript_enabled = true;
172 172
173 return web_prefs; 173 return web_prefs;
174 } 174 }
175 175
176 void DOMUIContents::RenderViewCreated(RenderViewHost* render_view_host) { 176 void DOMUIContents::RenderViewCreated(RenderViewHost* render_view_host) {
177 DCHECK(current_ui_); 177 if (current_ui_)
178 current_ui_->RenderViewCreated(render_view_host); 178 current_ui_->RenderViewCreated(render_view_host);
179 } 179 }
180 180
181 bool DOMUIContents::ShouldDisplayFavIcon() { 181 bool DOMUIContents::ShouldDisplayFavIcon() {
182 if (InitCurrentUI(false)) 182 if (InitCurrentUI(false))
183 return current_ui_->ShouldDisplayFavIcon(); 183 return current_ui_->ShouldDisplayFavIcon();
184 return true; 184 return true;
185 } 185 }
186 186
187 bool DOMUIContents::IsBookmarkBarAlwaysVisible() { 187 bool DOMUIContents::IsBookmarkBarAlwaysVisible() {
188 if (InitCurrentUI(false)) 188 if (InitCurrentUI(false))
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 return new DebuggerContents(this); 290 return new DebuggerContents(this);
291 } 291 }
292 if (url.host() == DevToolsUI::GetBaseURL().host()) { 292 if (url.host() == DevToolsUI::GetBaseURL().host()) {
293 return new DevToolsUI(this); 293 return new DevToolsUI(this);
294 } 294 }
295 #else 295 #else
296 NOTIMPLEMENTED(); 296 NOTIMPLEMENTED();
297 #endif 297 #endif
298 return NULL; 298 return NULL;
299 } 299 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698