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

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

Issue 21540: Add developer tools message forwarding to browser (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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
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/dom_ui.h" 9 #include "chrome/browser/dom_ui/dom_ui.h"
9 #include "chrome/browser/dom_ui/downloads_ui.h" 10 #include "chrome/browser/dom_ui/downloads_ui.h"
10 #include "chrome/browser/dom_ui/history_ui.h" 11 #include "chrome/browser/dom_ui/history_ui.h"
11 #include "chrome/browser/dom_ui/new_tab_ui.h" 12 #include "chrome/browser/dom_ui/new_tab_ui.h"
12 #include "chrome/browser/renderer_host/render_view_host.h" 13 #include "chrome/browser/renderer_host/render_view_host.h"
13 #include "chrome/browser/tab_contents/navigation_entry.h" 14 #include "chrome/browser/tab_contents/navigation_entry.h"
14 #include "chrome/common/resource_bundle.h" 15 #include "chrome/common/resource_bundle.h"
15 #include "chrome/common/url_constants.h" 16 #include "chrome/common/url_constants.h"
16 17
17 // The path used in internal URLs to thumbnail data. 18 // The path used in internal URLs to thumbnail data.
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 161
161 WebPreferences DOMUIContents::GetWebkitPrefs() { 162 WebPreferences DOMUIContents::GetWebkitPrefs() {
162 // Get the users preferences then force image loading to always be on. 163 // Get the users preferences then force image loading to always be on.
163 WebPreferences web_prefs = WebContents::GetWebkitPrefs(); 164 WebPreferences web_prefs = WebContents::GetWebkitPrefs();
164 web_prefs.loads_images_automatically = true; 165 web_prefs.loads_images_automatically = true;
165 web_prefs.javascript_enabled = true; 166 web_prefs.javascript_enabled = true;
166 167
167 return web_prefs; 168 return web_prefs;
168 } 169 }
169 170
171 void DOMUIContents::RenderViewCreated(RenderViewHost* render_view_host) {
172 DCHECK(current_ui_);
173 current_ui_->RenderViewCreated(render_view_host);
174 }
175
170 bool DOMUIContents::ShouldDisplayFavIcon() { 176 bool DOMUIContents::ShouldDisplayFavIcon() {
171 if (current_ui_) 177 if (current_ui_)
172 return current_ui_->ShouldDisplayFavIcon(); 178 return current_ui_->ShouldDisplayFavIcon();
173 return true; 179 return true;
174 } 180 }
175 181
176 bool DOMUIContents::IsBookmarkBarAlwaysVisible() { 182 bool DOMUIContents::IsBookmarkBarAlwaysVisible() {
177 if (current_ui_) 183 if (current_ui_)
178 return current_ui_->IsBookmarkBarAlwaysVisible(); 184 return current_ui_->IsBookmarkBarAlwaysVisible();
179 return false; 185 return false;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 // TODO(port): include this once these are converted to HTML 237 // TODO(port): include this once these are converted to HTML
232 if (url.host() == NewTabUI::GetBaseURL().host() || 238 if (url.host() == NewTabUI::GetBaseURL().host() ||
233 url.SchemeIs(chrome::kChromeInternalScheme)) { 239 url.SchemeIs(chrome::kChromeInternalScheme)) {
234 return new NewTabUI(this); 240 return new NewTabUI(this);
235 } else if (url.host() == HistoryUI::GetBaseURL().host()) { 241 } else if (url.host() == HistoryUI::GetBaseURL().host()) {
236 return new HistoryUI(this); 242 return new HistoryUI(this);
237 } else if (url.host() == DownloadsUI::GetBaseURL().host()) { 243 } else if (url.host() == DownloadsUI::GetBaseURL().host()) {
238 return new DownloadsUI(this); 244 return new DownloadsUI(this);
239 } else if (url.host() == DebuggerContents::GetBaseURL().host()) { 245 } else if (url.host() == DebuggerContents::GetBaseURL().host()) {
240 return new DebuggerContents(this); 246 return new DebuggerContents(this);
247 } else if (url.host() == DevToolsUI::GetBaseURL().host()) {
248 return new DevToolsUI(this);
241 } 249 }
242 #else 250 #else
243 NOTIMPLEMENTED(); 251 NOTIMPLEMENTED();
244 #endif 252 #endif
245 return NULL; 253 return NULL;
246 } 254 }
OLDNEW
« no previous file with comments | « chrome/browser/dom_ui/dom_ui_contents.h ('k') | chrome/browser/renderer_host/render_view_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698