{"action":"created","comment":{"url":"https://api.github.com/repos/atom/electron/pulls/comments/42084912","id":42084912,"diff_hunk":"@@ -0,0 +1,65 @@\n+// Copyright (c) 2015 GitHub, Inc.\n+// Use of this source code is governed by the MIT license that can be\n+// found in the LICENSE file.\n+\n+#ifndef ATOM_BROWSER_API_SAVE_PAGE_HANDLER_H_\n+#define ATOM_BROWSER_API_SAVE_PAGE_HANDLER_H_\n+\n+#include \"string\"\n+\n+#include \"content/public/browser/download_item.h\"\n+#include \"content/public/browser/download_manager.h\"\n+#include \"content/public/browser/save_page_type.h\"\n+#include \"v8/include/v8.h\"\n+\n+namespace base {\n+class FilePath;\n+}\n+\n+namespace content {\n+class WebContents;\n+}\n+\n+namespace atom {\n+\n+class AtomBrowserContext;\n+\n+namespace api {\n+\n+// A self-destroyed class for handling save page request.\n+class SavePageHandler : public content::DownloadManager::Observer,\n+                        public content::DownloadItem::Observer {\n+ public:\n+  using SavePageCallback = base::Callback<void(v8::Local<v8::Value>)>;","path":"atom/browser/api/save_page_handler.h","position":null,"original_position":33,"commit_id":"e791ac284edda82810e007a7dc50016c96652a21","original_commit_id":"a58fae99700995a43dbac240759c2a9e5d1f531b","user":{"login":"hokein","id":2557445,"avatar_url":"https://avatars.githubusercontent.com/u/2557445?v=3","gravatar_id":"","url":"https://api.github.com/users/hokein","html_url":"https://github.com/hokein","followers_url":"https://api.github.com/users/hokein/followers","following_url":"https://api.github.com/users/hokein/following{/other_user}","gists_url":"https://api.github.com/users/hokein/gists{/gist_id}","starred_url":"https://api.github.com/users/hokein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hokein/subscriptions","organizations_url":"https://api.github.com/users/hokein/orgs","repos_url":"https://api.github.com/users/hokein/repos","events_url":"https://api.github.com/users/hokein/events{/privacy}","received_events_url":"https://api.github.com/users/hokein/received_events","type":"User","site_admin":false},"body":"Done.","created_at":"2015-10-15T05:33:41Z","updated_at":"2015-10-15T05:33:41Z","html_url":"https://github.com/atom/electron/pull/3080#discussion_r42084912","pull_request_url":"https://api.github.com/repos/atom/electron/pulls/3080","_links":{"self":{"href":"https://api.github.com/repos/atom/electron/pulls/comments/42084912"},"html":{"href":"https://github.com/atom/electron/pull/3080#discussion_r42084912"},"pull_request":{"href":"https://api.github.com/repos/atom/electron/pulls/3080"}}},"pull_request":{"url":"https://api.github.com/repos/atom/electron/pulls/3080","id":47617538,"html_url":"https://github.com/atom/electron/pull/3080","diff_url":"https://github.com/atom/electron/pull/3080.diff","patch_url":"https://github.com/atom/electron/pull/3080.patch","issue_url":"https://api.github.com/repos/atom/electron/issues/3080","number":3080,"state":"open","locked":false,"title":"Implement webContents.savePage API.","user":{"login":"hokein","id":2557445,"avatar_url":"https://avatars.githubusercontent.com/u/2557445?v=3","gravatar_id":"","url":"https://api.github.com/users/hokein","html_url":"https://github.com/hokein","followers_url":"https://api.github.com/users/hokein/followers","following_url":"https://api.github.com/users/hokein/following{/other_user}","gists_url":"https://api.github.com/users/hokein/gists{/gist_id}","starred_url":"https://api.github.com/users/hokein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hokein/subscriptions","organizations_url":"https://api.github.com/users/hokein/orgs","repos_url":"https://api.github.com/users/hokein/repos","events_url":"https://api.github.com/users/hokein/events{/privacy}","received_events_url":"https://api.github.com/users/hokein/received_events","type":"User","site_admin":false},"body":"Fixes #2937.","created_at":"2015-10-14T04:46:57Z","updated_at":"2015-10-15T05:33:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"64b8384f505421bfbab184f8bd8d458b44b4ed5b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/atom/electron/pulls/3080/commits","review_comments_url":"https://api.github.com/repos/atom/electron/pulls/3080/comments","review_comment_url":"https://api.github.com/repos/atom/electron/pulls/comments{/number}","comments_url":"https://api.github.com/repos/atom/electron/issues/3080/comments","statuses_url":"https://api.github.com/repos/atom/electron/statuses/e791ac284edda82810e007a7dc50016c96652a21","head":{"label":"atom:save-page-api","ref":"save-page-api","sha":"e791ac284edda82810e007a7dc50016c96652a21","user":{"login":"atom","id":1089146,"avatar_url":"https://avatars.githubusercontent.com/u/1089146?v=3","gravatar_id":"","url":"https://api.github.com/users/atom","html_url":"https://github.com/atom","followers_url":"https://api.github.com/users/atom/followers","following_url":"https://api.github.com/users/atom/following{/other_user}","gists_url":"https://api.github.com/users/atom/gists{/gist_id}","starred_url":"https://api.github.com/users/atom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atom/subscriptions","organizations_url":"https://api.github.com/users/atom/orgs","repos_url":"https://api.github.com/users/atom/repos","events_url":"https://api.github.com/users/atom/events{/privacy}","received_events_url":"https://api.github.com/users/atom/received_events","type":"Organization","site_admin":false},"repo":{"id":9384267,"name":"electron","full_name":"atom/electron","owner":{"login":"atom","id":1089146,"avatar_url":"https://avatars.githubusercontent.com/u/1089146?v=3","gravatar_id":"","url":"https://api.github.com/users/atom","html_url":"https://github.com/atom","followers_url":"https://api.github.com/users/atom/followers","following_url":"https://api.github.com/users/atom/following{/other_user}","gists_url":"https://api.github.com/users/atom/gists{/gist_id}","starred_url":"https://api.github.com/users/atom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atom/subscriptions","organizations_url":"https://api.github.com/users/atom/orgs","repos_url":"https://api.github.com/users/atom/repos","events_url":"https://api.github.com/users/atom/events{/privacy}","received_events_url":"https://api.github.com/users/atom/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/atom/electron","description":"Build cross platform desktop apps with web technologies","fork":false,"url":"https://api.github.com/repos/atom/electron","forks_url":"https://api.github.com/repos/atom/electron/forks","keys_url":"https://api.github.com/repos/atom/electron/keys{/key_id}","collaborators_url":"https://api.github.com/repos/atom/electron/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/atom/electron/teams","hooks_url":"https://api.github.com/repos/atom/electron/hooks","issue_events_url":"https://api.github.com/repos/atom/electron/issues/events{/number}","events_url":"https://api.github.com/repos/atom/electron/events","assignees_url":"https://api.github.com/repos/atom/electron/assignees{/user}","branches_url":"https://api.github.com/repos/atom/electron/branches{/branch}","tags_url":"https://api.github.com/repos/atom/electron/tags","blobs_url":"https://api.github.com/repos/atom/electron/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/atom/electron/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/atom/electron/git/refs{/sha}","trees_url":"https://api.github.com/repos/atom/electron/git/trees{/sha}","statuses_url":"https://api.github.com/repos/atom/electron/statuses/{sha}","languages_url":"https://api.github.com/repos/atom/electron/languages","stargazers_url":"https://api.github.com/repos/atom/electron/stargazers","contributors_url":"https://api.github.com/repos/atom/electron/contributors","subscribers_url":"https://api.github.com/repos/atom/electron/subscribers","subscription_url":"https://api.github.com/repos/atom/electron/subscription","commits_url":"https://api.github.com/repos/atom/electron/commits{/sha}","git_commits_url":"https://api.github.com/repos/atom/electron/git/commits{/sha}","comments_url":"https://api.github.com/repos/atom/electron/comments{/number}","issue_comment_url":"https://api.github.com/repos/atom/electron/issues/comments{/number}","contents_url":"https://api.github.com/repos/atom/electron/contents/{+path}","compare_url":"https://api.github.com/repos/atom/electron/compare/{base}...{head}","merges_url":"https://api.github.com/repos/atom/electron/merges","archive_url":"https://api.github.com/repos/atom/electron/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/atom/electron/downloads","issues_url":"https://api.github.com/repos/atom/electron/issues{/number}","pulls_url":"https://api.github.com/repos/atom/electron/pulls{/number}","milestones_url":"https://api.github.com/repos/atom/electron/milestones{/number}","notifications_url":"https://api.github.com/repos/atom/electron/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/atom/electron/labels{/name}","releases_url":"https://api.github.com/repos/atom/electron/releases{/id}","created_at":"2013-04-12T01:47:36Z","updated_at":"2015-10-15T05:33:06Z","pushed_at":"2015-10-15T05:26:11Z","git_url":"git://github.com/atom/electron.git","ssh_url":"git@github.com:atom/electron.git","clone_url":"https://github.com/atom/electron.git","svn_url":"https://github.com/atom/electron","homepage":"http://electron.atom.io","size":26677,"stargazers_count":17939,"watchers_count":17939,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1545,"mirror_url":null,"open_issues_count":240,"forks":1545,"open_issues":240,"watchers":17939,"default_branch":"master"}},"base":{"label":"atom:master","ref":"master","sha":"7a6ef0ec6e5d663acc1d8bad8884425ba6cfb67c","user":{"login":"atom","id":1089146,"avatar_url":"https://avatars.githubusercontent.com/u/1089146?v=3","gravatar_id":"","url":"https://api.github.com/users/atom","html_url":"https://github.com/atom","followers_url":"https://api.github.com/users/atom/followers","following_url":"https://api.github.com/users/atom/following{/other_user}","gists_url":"https://api.github.com/users/atom/gists{/gist_id}","starred_url":"https://api.github.com/users/atom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atom/subscriptions","organizations_url":"https://api.github.com/users/atom/orgs","repos_url":"https://api.github.com/users/atom/repos","events_url":"https://api.github.com/users/atom/events{/privacy}","received_events_url":"https://api.github.com/users/atom/received_events","type":"Organization","site_admin":false},"repo":{"id":9384267,"name":"electron","full_name":"atom/electron","owner":{"login":"atom","id":1089146,"avatar_url":"https://avatars.githubusercontent.com/u/1089146?v=3","gravatar_id":"","url":"https://api.github.com/users/atom","html_url":"https://github.com/atom","followers_url":"https://api.github.com/users/atom/followers","following_url":"https://api.github.com/users/atom/following{/other_user}","gists_url":"https://api.github.com/users/atom/gists{/gist_id}","starred_url":"https://api.github.com/users/atom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atom/subscriptions","organizations_url":"https://api.github.com/users/atom/orgs","repos_url":"https://api.github.com/users/atom/repos","events_url":"https://api.github.com/users/atom/events{/privacy}","received_events_url":"https://api.github.com/users/atom/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/atom/electron","description":"Build cross platform desktop apps with web technologies","fork":false,"url":"https://api.github.com/repos/atom/electron","forks_url":"https://api.github.com/repos/atom/electron/forks","keys_url":"https://api.github.com/repos/atom/electron/keys{/key_id}","collaborators_url":"https://api.github.com/repos/atom/electron/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/atom/electron/teams","hooks_url":"https://api.github.com/repos/atom/electron/hooks","issue_events_url":"https://api.github.com/repos/atom/electron/issues/events{/number}","events_url":"https://api.github.com/repos/atom/electron/events","assignees_url":"https://api.github.com/repos/atom/electron/assignees{/user}","branches_url":"https://api.github.com/repos/atom/electron/branches{/branch}","tags_url":"https://api.github.com/repos/atom/electron/tags","blobs_url":"https://api.github.com/repos/atom/electron/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/atom/electron/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/atom/electron/git/refs{/sha}","trees_url":"https://api.github.com/repos/atom/electron/git/trees{/sha}","statuses_url":"https://api.github.com/repos/atom/electron/statuses/{sha}","languages_url":"https://api.github.com/repos/atom/electron/languages","stargazers_url":"https://api.github.com/repos/atom/electron/stargazers","contributors_url":"https://api.github.com/repos/atom/electron/contributors","subscribers_url":"https://api.github.com/repos/atom/electron/subscribers","subscription_url":"https://api.github.com/repos/atom/electron/subscription","commits_url":"https://api.github.com/repos/atom/electron/commits{/sha}","git_commits_url":"https://api.github.com/repos/atom/electron/git/commits{/sha}","comments_url":"https://api.github.com/repos/atom/electron/comments{/number}","issue_comment_url":"https://api.github.com/repos/atom/electron/issues/comments{/number}","contents_url":"https://api.github.com/repos/atom/electron/contents/{+path}","compare_url":"https://api.github.com/repos/atom/electron/compare/{base}...{head}","merges_url":"https://api.github.com/repos/atom/electron/merges","archive_url":"https://api.github.com/repos/atom/electron/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/atom/electron/downloads","issues_url":"https://api.github.com/repos/atom/electron/issues{/number}","pulls_url":"https://api.github.com/repos/atom/electron/pulls{/number}","milestones_url":"https://api.github.com/repos/atom/electron/milestones{/number}","notifications_url":"https://api.github.com/repos/atom/electron/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/atom/electron/labels{/name}","releases_url":"https://api.github.com/repos/atom/electron/releases{/id}","created_at":"2013-04-12T01:47:36Z","updated_at":"2015-10-15T05:33:06Z","pushed_at":"2015-10-15T05:26:11Z","git_url":"git://github.com/atom/electron.git","ssh_url":"git@github.com:atom/electron.git","clone_url":"https://github.com/atom/electron.git","svn_url":"https://github.com/atom/electron","homepage":"http://electron.atom.io","size":26677,"stargazers_count":17939,"watchers_count":17939,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1545,"mirror_url":null,"open_issues_count":240,"forks":1545,"open_issues":240,"watchers":17939,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/atom/electron/pulls/3080"},"html":{"href":"https://github.com/atom/electron/pull/3080"},"issue":{"href":"https://api.github.com/repos/atom/electron/issues/3080"},"comments":{"href":"https://api.github.com/repos/atom/electron/issues/3080/comments"},"review_comments":{"href":"https://api.github.com/repos/atom/electron/pulls/3080/comments"},"review_comment":{"href":"https://api.github.com/repos/atom/electron/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/atom/electron/pulls/3080/commits"},"statuses":{"href":"https://api.github.com/repos/atom/electron/statuses/e791ac284edda82810e007a7dc50016c96652a21"}}}}