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

Side by Side Diff: chrome/browser/extensions/extension_function.cc

Issue 9473001: Extract minimal RenderViewHost interface for embedders, leaving (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ready for initial review. Created 8 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/extensions/extension_function.h" 5 #include "chrome/browser/extensions/extension_function.h"
6 6
7 #include "base/json/json_writer.h" 7 #include "base/json/json_writer.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "chrome/browser/extensions/extension_function_dispatcher.h" 9 #include "chrome/browser/extensions/extension_function_dispatcher.h"
10 #include "chrome/browser/extensions/extension_service.h" 10 #include "chrome/browser/extensions/extension_service.h"
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 return dispatcher()->GetCurrentBrowser(render_view_host_, include_incognito_); 178 return dispatcher()->GetCurrentBrowser(render_view_host_, include_incognito_);
179 } 179 }
180 180
181 void UIThreadExtensionFunction::SendResponse(bool success) { 181 void UIThreadExtensionFunction::SendResponse(bool success) {
182 if (delegate_) { 182 if (delegate_) {
183 delegate_->OnSendResponse(this, success); 183 delegate_->OnSendResponse(this, success);
184 } else { 184 } else {
185 if (!render_view_host_ || !dispatcher()) 185 if (!render_view_host_ || !dispatcher())
186 return; 186 return;
187 187
188 SendResponseImpl(render_view_host_->process()->GetHandle(), 188 SendResponseImpl(render_view_host_->GetProcess()->GetHandle(),
189 render_view_host_, 189 render_view_host_,
190 render_view_host_->routing_id(), 190 render_view_host_->GetRoutingID(),
191 success); 191 success);
192 } 192 }
193 } 193 }
194 194
195 IOThreadExtensionFunction::IOThreadExtensionFunction() 195 IOThreadExtensionFunction::IOThreadExtensionFunction()
196 : routing_id_(-1) { 196 : routing_id_(-1) {
197 } 197 }
198 198
199 IOThreadExtensionFunction::~IOThreadExtensionFunction() { 199 IOThreadExtensionFunction::~IOThreadExtensionFunction() {
200 } 200 }
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 234
235 SyncIOThreadExtensionFunction::SyncIOThreadExtensionFunction() { 235 SyncIOThreadExtensionFunction::SyncIOThreadExtensionFunction() {
236 } 236 }
237 237
238 SyncIOThreadExtensionFunction::~SyncIOThreadExtensionFunction() { 238 SyncIOThreadExtensionFunction::~SyncIOThreadExtensionFunction() {
239 } 239 }
240 240
241 void SyncIOThreadExtensionFunction::Run() { 241 void SyncIOThreadExtensionFunction::Run() {
242 SendResponse(RunImpl()); 242 SendResponse(RunImpl());
243 } 243 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698