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

Side by Side Diff: chrome/browser/download/download_extension_api.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/download/download_extension_api.h" 5 #include "chrome/browser/download/download_extension_api.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cctype> 8 #include <cctype>
9 #include <iterator> 9 #include <iterator>
10 #include <set> 10 #include <set>
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 kHeaderValueKey, &value)); 426 kHeaderValueKey, &value));
427 } 427 }
428 if (!net::HttpUtil::IsSafeHeader(name)) { 428 if (!net::HttpUtil::IsSafeHeader(name)) {
429 error_ = download_extension_errors::kGenericError; 429 error_ = download_extension_errors::kGenericError;
430 return false; 430 return false;
431 } 431 }
432 } 432 }
433 } 433 }
434 iodata_->rdh = ResourceDispatcherHost::Get(); 434 iodata_->rdh = ResourceDispatcherHost::Get();
435 iodata_->resource_context = profile()->GetResourceContext(); 435 iodata_->resource_context = profile()->GetResourceContext();
436 iodata_->render_process_host_id = render_view_host()->process()->GetID(); 436 iodata_->render_process_host_id = render_view_host()->GetProcess()->GetID();
437 iodata_->render_view_host_routing_id = render_view_host()->routing_id(); 437 iodata_->render_view_host_routing_id = render_view_host()->GetRoutingID();
438 return true; 438 return true;
439 } 439 }
440 440
441 bool DownloadsDownloadFunction::RunInternal() { 441 bool DownloadsDownloadFunction::RunInternal() {
442 VLOG(1) << __FUNCTION__ << " " << iodata_->url.spec(); 442 VLOG(1) << __FUNCTION__ << " " << iodata_->url.spec();
443 if (!BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, base::Bind( 443 if (!BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, base::Bind(
444 &DownloadsDownloadFunction::BeginDownloadOnIOThread, this))) { 444 &DownloadsDownloadFunction::BeginDownloadOnIOThread, this))) {
445 error_ = download_extension_errors::kGenericError; 445 error_ = download_extension_errors::kGenericError;
446 return false; 446 return false;
447 } 447 }
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after
1066 ListValue args; 1066 ListValue args;
1067 args.Append(arg); 1067 args.Append(arg);
1068 std::string json_args; 1068 std::string json_args;
1069 base::JSONWriter::Write(&args, false, &json_args); 1069 base::JSONWriter::Write(&args, false, &json_args);
1070 profile_->GetExtensionEventRouter()->DispatchEventToRenderers( 1070 profile_->GetExtensionEventRouter()->DispatchEventToRenderers(
1071 event_name, 1071 event_name,
1072 json_args, 1072 json_args,
1073 profile_, 1073 profile_,
1074 GURL()); 1074 GURL());
1075 } 1075 }
OLDNEW
« no previous file with comments | « chrome/browser/debugger/devtools_window.cc ('k') | chrome/browser/extensions/app_process_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698