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

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: Merge to LKGR. 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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 return dispatcher()->GetCurrentBrowser(render_view_host_, include_incognito_); 180 return dispatcher()->GetCurrentBrowser(render_view_host_, include_incognito_);
181 } 181 }
182 182
183 void UIThreadExtensionFunction::SendResponse(bool success) { 183 void UIThreadExtensionFunction::SendResponse(bool success) {
184 if (delegate_) { 184 if (delegate_) {
185 delegate_->OnSendResponse(this, success); 185 delegate_->OnSendResponse(this, success);
186 } else { 186 } else {
187 if (!render_view_host_ || !dispatcher()) 187 if (!render_view_host_ || !dispatcher())
188 return; 188 return;
189 189
190 SendResponseImpl(render_view_host_->process()->GetHandle(), 190 SendResponseImpl(render_view_host_->GetProcess()->GetHandle(),
191 render_view_host_, 191 render_view_host_,
192 render_view_host_->routing_id(), 192 render_view_host_->GetRoutingID(),
193 success); 193 success);
194 } 194 }
195 } 195 }
196 196
197 IOThreadExtensionFunction::IOThreadExtensionFunction() 197 IOThreadExtensionFunction::IOThreadExtensionFunction()
198 : routing_id_(-1) { 198 : routing_id_(-1) {
199 } 199 }
200 200
201 IOThreadExtensionFunction::~IOThreadExtensionFunction() { 201 IOThreadExtensionFunction::~IOThreadExtensionFunction() {
202 } 202 }
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 236
237 SyncIOThreadExtensionFunction::SyncIOThreadExtensionFunction() { 237 SyncIOThreadExtensionFunction::SyncIOThreadExtensionFunction() {
238 } 238 }
239 239
240 SyncIOThreadExtensionFunction::~SyncIOThreadExtensionFunction() { 240 SyncIOThreadExtensionFunction::~SyncIOThreadExtensionFunction() {
241 } 241 }
242 242
243 void SyncIOThreadExtensionFunction::Run() { 243 void SyncIOThreadExtensionFunction::Run() {
244 SendResponse(RunImpl()); 244 SendResponse(RunImpl());
245 } 245 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_debugger_api.cc ('k') | chrome/browser/extensions/extension_function_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698