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

Side by Side Diff: chrome/browser/tab_contents/background_contents.cc

Issue 7283022: Make a clean interface for dialog callbacks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 9 years, 5 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) 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 "chrome/browser/tab_contents/background_contents.h" 5 #include "chrome/browser/tab_contents/background_contents.h"
6 6
7 #include "chrome/browser/background/background_contents_service.h" 7 #include "chrome/browser/background/background_contents_service.h"
8 #include "chrome/browser/extensions/extension_message_service.h" 8 #include "chrome/browser/extensions/extension_message_service.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/renderer_preferences_util.h" 10 #include "chrome/browser/renderer_preferences_util.h"
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 render_view_host()->JavaScriptDialogClosed(reply_msg, 143 render_view_host()->JavaScriptDialogClosed(reply_msg,
144 success, 144 success,
145 user_input); 145 user_input);
146 } 146 }
147 147
148 gfx::NativeWindow BackgroundContents::GetDialogRootWindow() { 148 gfx::NativeWindow BackgroundContents::GetDialogRootWindow() {
149 NOTIMPLEMENTED(); 149 NOTIMPLEMENTED();
150 return NULL; 150 return NULL;
151 } 151 }
152 152
153 TabContents* BackgroundContents::AsTabContents() {
154 return NULL;
155 }
156
157 ExtensionHost* BackgroundContents::AsExtensionHost() {
158 return NULL;
159 }
160
161 void BackgroundContents::UpdateInspectorSetting(const std::string& key, 153 void BackgroundContents::UpdateInspectorSetting(const std::string& key,
162 const std::string& value) { 154 const std::string& value) {
163 Profile* profile = render_view_host_->process()->profile(); 155 Profile* profile = render_view_host_->process()->profile();
164 RenderViewHostDelegateHelper::UpdateInspectorSetting(profile, key, value); 156 RenderViewHostDelegateHelper::UpdateInspectorSetting(profile, key, value);
165 } 157 }
166 158
167 void BackgroundContents::ClearInspectorSettings() { 159 void BackgroundContents::ClearInspectorSettings() {
168 Profile* profile = render_view_host_->process()->profile(); 160 Profile* profile = render_view_host_->process()->profile();
169 RenderViewHostDelegateHelper::ClearInspectorSettings(profile); 161 RenderViewHostDelegateHelper::ClearInspectorSettings(profile);
170 } 162 }
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 BackgroundContents* 246 BackgroundContents*
255 BackgroundContents::GetBackgroundContentsByID(int render_process_id, 247 BackgroundContents::GetBackgroundContentsByID(int render_process_id,
256 int render_view_id) { 248 int render_view_id) {
257 RenderViewHost* render_view_host = 249 RenderViewHost* render_view_host =
258 RenderViewHost::FromID(render_process_id, render_view_id); 250 RenderViewHost::FromID(render_process_id, render_view_id);
259 if (!render_view_host) 251 if (!render_view_host)
260 return NULL; 252 return NULL;
261 253
262 return render_view_host->delegate()->GetAsBackgroundContents(); 254 return render_view_host->delegate()->GetAsBackgroundContents();
263 } 255 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698