{"action":"created","comment":{"url":"https://api.github.com/repos/ampproject/amphtml/pulls/comments/62534503","id":62534503,"diff_hunk":"@@ -276,6 +276,16 @@ export class Viewer {\n     this.performanceTracking_ = this.params_['csi'] === '1';\n     dev.fine(TAG_, '- performanceTracking:', this.performanceTracking_);\n \n+    /**\n+     * Whether the AMP document is embedded in a viewer, such as an iframe or\n+     * a web view.\n+     * Notice that the value of the \"origin\" parameter itself is never consulted\n+     * here, but instead confirmed via handshake in the `setMessageDeliverer`\n+     * method.\n+     * @private @const {boolean}\n+     */\n+    this.isEmbedded_ = this.isIframed_ || !!this.params_['origin'];","path":"src/service/viewer-impl.js","position":32,"original_position":32,"commit_id":"4ff5c835dc09815320fa61df7b9677f8908b225d","original_commit_id":"4ff5c835dc09815320fa61df7b9677f8908b225d","user":{"login":"cramforce","id":89679,"avatar_url":"https://avatars.githubusercontent.com/u/89679?v=3","gravatar_id":"","url":"https://api.github.com/users/cramforce","html_url":"https://github.com/cramforce","followers_url":"https://api.github.com/users/cramforce/followers","following_url":"https://api.github.com/users/cramforce/following{/other_user}","gists_url":"https://api.github.com/users/cramforce/gists{/gist_id}","starred_url":"https://api.github.com/users/cramforce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cramforce/subscriptions","organizations_url":"https://api.github.com/users/cramforce/orgs","repos_url":"https://api.github.com/users/cramforce/repos","events_url":"https://api.github.com/users/cramforce/events{/privacy}","received_events_url":"https://api.github.com/users/cramforce/received_events","type":"User","site_admin":false},"body":"Using origin here seems a bit unintuitive. Maybe call a method like `isNativeEmbedder`?","created_at":"2016-05-09T17:05:13Z","updated_at":"2016-05-09T17:05:13Z","html_url":"https://github.com/ampproject/amphtml/pull/3162#discussion_r62534503","pull_request_url":"https://api.github.com/repos/ampproject/amphtml/pulls/3162","_links":{"self":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/comments/62534503"},"html":{"href":"https://github.com/ampproject/amphtml/pull/3162#discussion_r62534503"},"pull_request":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/3162"}}},"pull_request":{"url":"https://api.github.com/repos/ampproject/amphtml/pulls/3162","id":69374464,"html_url":"https://github.com/ampproject/amphtml/pull/3162","diff_url":"https://github.com/ampproject/amphtml/pull/3162.diff","patch_url":"https://github.com/ampproject/amphtml/pull/3162.patch","issue_url":"https://api.github.com/repos/ampproject/amphtml/issues/3162","number":3162,"state":"open","locked":false,"title":"Viewer: cleanup definitions of embedded and iframed. Enable web view handshake","user":{"login":"dvoytenko","id":726049,"avatar_url":"https://avatars.githubusercontent.com/u/726049?v=3","gravatar_id":"","url":"https://api.github.com/users/dvoytenko","html_url":"https://github.com/dvoytenko","followers_url":"https://api.github.com/users/dvoytenko/followers","following_url":"https://api.github.com/users/dvoytenko/following{/other_user}","gists_url":"https://api.github.com/users/dvoytenko/gists{/gist_id}","starred_url":"https://api.github.com/users/dvoytenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dvoytenko/subscriptions","organizations_url":"https://api.github.com/users/dvoytenko/orgs","repos_url":"https://api.github.com/users/dvoytenko/repos","events_url":"https://api.github.com/users/dvoytenko/events{/privacy}","received_events_url":"https://api.github.com/users/dvoytenko/received_events","type":"User","site_admin":false},"body":"Closes #3117.","created_at":"2016-05-09T16:40:15Z","updated_at":"2016-05-09T17:05:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e99389cf6340e67f9899c8aeb3b2174a1aca2707","assignee":{"login":"cramforce","id":89679,"avatar_url":"https://avatars.githubusercontent.com/u/89679?v=3","gravatar_id":"","url":"https://api.github.com/users/cramforce","html_url":"https://github.com/cramforce","followers_url":"https://api.github.com/users/cramforce/followers","following_url":"https://api.github.com/users/cramforce/following{/other_user}","gists_url":"https://api.github.com/users/cramforce/gists{/gist_id}","starred_url":"https://api.github.com/users/cramforce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cramforce/subscriptions","organizations_url":"https://api.github.com/users/cramforce/orgs","repos_url":"https://api.github.com/users/cramforce/repos","events_url":"https://api.github.com/users/cramforce/events{/privacy}","received_events_url":"https://api.github.com/users/cramforce/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/ampproject/amphtml/pulls/3162/commits","review_comments_url":"https://api.github.com/repos/ampproject/amphtml/pulls/3162/comments","review_comment_url":"https://api.github.com/repos/ampproject/amphtml/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ampproject/amphtml/issues/3162/comments","statuses_url":"https://api.github.com/repos/ampproject/amphtml/statuses/4ff5c835dc09815320fa61df7b9677f8908b225d","head":{"label":"dvoytenko:viewer6","ref":"viewer6","sha":"4ff5c835dc09815320fa61df7b9677f8908b225d","user":{"login":"dvoytenko","id":726049,"avatar_url":"https://avatars.githubusercontent.com/u/726049?v=3","gravatar_id":"","url":"https://api.github.com/users/dvoytenko","html_url":"https://github.com/dvoytenko","followers_url":"https://api.github.com/users/dvoytenko/followers","following_url":"https://api.github.com/users/dvoytenko/following{/other_user}","gists_url":"https://api.github.com/users/dvoytenko/gists{/gist_id}","starred_url":"https://api.github.com/users/dvoytenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dvoytenko/subscriptions","organizations_url":"https://api.github.com/users/dvoytenko/orgs","repos_url":"https://api.github.com/users/dvoytenko/repos","events_url":"https://api.github.com/users/dvoytenko/events{/privacy}","received_events_url":"https://api.github.com/users/dvoytenko/received_events","type":"User","site_admin":false},"repo":{"id":43817704,"name":"amphtml","full_name":"dvoytenko/amphtml","owner":{"login":"dvoytenko","id":726049,"avatar_url":"https://avatars.githubusercontent.com/u/726049?v=3","gravatar_id":"","url":"https://api.github.com/users/dvoytenko","html_url":"https://github.com/dvoytenko","followers_url":"https://api.github.com/users/dvoytenko/followers","following_url":"https://api.github.com/users/dvoytenko/following{/other_user}","gists_url":"https://api.github.com/users/dvoytenko/gists{/gist_id}","starred_url":"https://api.github.com/users/dvoytenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dvoytenko/subscriptions","organizations_url":"https://api.github.com/users/dvoytenko/orgs","repos_url":"https://api.github.com/users/dvoytenko/repos","events_url":"https://api.github.com/users/dvoytenko/events{/privacy}","received_events_url":"https://api.github.com/users/dvoytenko/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dvoytenko/amphtml","description":"","fork":true,"url":"https://api.github.com/repos/dvoytenko/amphtml","forks_url":"https://api.github.com/repos/dvoytenko/amphtml/forks","keys_url":"https://api.github.com/repos/dvoytenko/amphtml/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dvoytenko/amphtml/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dvoytenko/amphtml/teams","hooks_url":"https://api.github.com/repos/dvoytenko/amphtml/hooks","issue_events_url":"https://api.github.com/repos/dvoytenko/amphtml/issues/events{/number}","events_url":"https://api.github.com/repos/dvoytenko/amphtml/events","assignees_url":"https://api.github.com/repos/dvoytenko/amphtml/assignees{/user}","branches_url":"https://api.github.com/repos/dvoytenko/amphtml/branches{/branch}","tags_url":"https://api.github.com/repos/dvoytenko/amphtml/tags","blobs_url":"https://api.github.com/repos/dvoytenko/amphtml/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dvoytenko/amphtml/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dvoytenko/amphtml/git/refs{/sha}","trees_url":"https://api.github.com/repos/dvoytenko/amphtml/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dvoytenko/amphtml/statuses/{sha}","languages_url":"https://api.github.com/repos/dvoytenko/amphtml/languages","stargazers_url":"https://api.github.com/repos/dvoytenko/amphtml/stargazers","contributors_url":"https://api.github.com/repos/dvoytenko/amphtml/contributors","subscribers_url":"https://api.github.com/repos/dvoytenko/amphtml/subscribers","subscription_url":"https://api.github.com/repos/dvoytenko/amphtml/subscription","commits_url":"https://api.github.com/repos/dvoytenko/amphtml/commits{/sha}","git_commits_url":"https://api.github.com/repos/dvoytenko/amphtml/git/commits{/sha}","comments_url":"https://api.github.com/repos/dvoytenko/amphtml/comments{/number}","issue_comment_url":"https://api.github.com/repos/dvoytenko/amphtml/issues/comments{/number}","contents_url":"https://api.github.com/repos/dvoytenko/amphtml/contents/{+path}","compare_url":"https://api.github.com/repos/dvoytenko/amphtml/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dvoytenko/amphtml/merges","archive_url":"https://api.github.com/repos/dvoytenko/amphtml/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dvoytenko/amphtml/downloads","issues_url":"https://api.github.com/repos/dvoytenko/amphtml/issues{/number}","pulls_url":"https://api.github.com/repos/dvoytenko/amphtml/pulls{/number}","milestones_url":"https://api.github.com/repos/dvoytenko/amphtml/milestones{/number}","notifications_url":"https://api.github.com/repos/dvoytenko/amphtml/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dvoytenko/amphtml/labels{/name}","releases_url":"https://api.github.com/repos/dvoytenko/amphtml/releases{/id}","deployments_url":"https://api.github.com/repos/dvoytenko/amphtml/deployments","created_at":"2015-10-07T13:30:20Z","updated_at":"2016-01-11T18:44:41Z","pushed_at":"2016-05-09T16:39:10Z","git_url":"git://github.com/dvoytenko/amphtml.git","ssh_url":"git@github.com:dvoytenko/amphtml.git","clone_url":"https://github.com/dvoytenko/amphtml.git","svn_url":"https://github.com/dvoytenko/amphtml","homepage":"","size":72303,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"ampproject:master","ref":"master","sha":"ebb79de637302f7f0e27396c9c57fb0550af7c18","user":{"login":"ampproject","id":14114390,"avatar_url":"https://avatars.githubusercontent.com/u/14114390?v=3","gravatar_id":"","url":"https://api.github.com/users/ampproject","html_url":"https://github.com/ampproject","followers_url":"https://api.github.com/users/ampproject/followers","following_url":"https://api.github.com/users/ampproject/following{/other_user}","gists_url":"https://api.github.com/users/ampproject/gists{/gist_id}","starred_url":"https://api.github.com/users/ampproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ampproject/subscriptions","organizations_url":"https://api.github.com/users/ampproject/orgs","repos_url":"https://api.github.com/users/ampproject/repos","events_url":"https://api.github.com/users/ampproject/events{/privacy}","received_events_url":"https://api.github.com/users/ampproject/received_events","type":"Organization","site_admin":false},"repo":{"id":41766002,"name":"amphtml","full_name":"ampproject/amphtml","owner":{"login":"ampproject","id":14114390,"avatar_url":"https://avatars.githubusercontent.com/u/14114390?v=3","gravatar_id":"","url":"https://api.github.com/users/ampproject","html_url":"https://github.com/ampproject","followers_url":"https://api.github.com/users/ampproject/followers","following_url":"https://api.github.com/users/ampproject/following{/other_user}","gists_url":"https://api.github.com/users/ampproject/gists{/gist_id}","starred_url":"https://api.github.com/users/ampproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ampproject/subscriptions","organizations_url":"https://api.github.com/users/ampproject/orgs","repos_url":"https://api.github.com/users/ampproject/repos","events_url":"https://api.github.com/users/ampproject/events{/privacy}","received_events_url":"https://api.github.com/users/ampproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ampproject/amphtml","description":"AMP HTML source code, samples, and documentation.  See below for more info.","fork":false,"url":"https://api.github.com/repos/ampproject/amphtml","forks_url":"https://api.github.com/repos/ampproject/amphtml/forks","keys_url":"https://api.github.com/repos/ampproject/amphtml/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ampproject/amphtml/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ampproject/amphtml/teams","hooks_url":"https://api.github.com/repos/ampproject/amphtml/hooks","issue_events_url":"https://api.github.com/repos/ampproject/amphtml/issues/events{/number}","events_url":"https://api.github.com/repos/ampproject/amphtml/events","assignees_url":"https://api.github.com/repos/ampproject/amphtml/assignees{/user}","branches_url":"https://api.github.com/repos/ampproject/amphtml/branches{/branch}","tags_url":"https://api.github.com/repos/ampproject/amphtml/tags","blobs_url":"https://api.github.com/repos/ampproject/amphtml/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ampproject/amphtml/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ampproject/amphtml/git/refs{/sha}","trees_url":"https://api.github.com/repos/ampproject/amphtml/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ampproject/amphtml/statuses/{sha}","languages_url":"https://api.github.com/repos/ampproject/amphtml/languages","stargazers_url":"https://api.github.com/repos/ampproject/amphtml/stargazers","contributors_url":"https://api.github.com/repos/ampproject/amphtml/contributors","subscribers_url":"https://api.github.com/repos/ampproject/amphtml/subscribers","subscription_url":"https://api.github.com/repos/ampproject/amphtml/subscription","commits_url":"https://api.github.com/repos/ampproject/amphtml/commits{/sha}","git_commits_url":"https://api.github.com/repos/ampproject/amphtml/git/commits{/sha}","comments_url":"https://api.github.com/repos/ampproject/amphtml/comments{/number}","issue_comment_url":"https://api.github.com/repos/ampproject/amphtml/issues/comments{/number}","contents_url":"https://api.github.com/repos/ampproject/amphtml/contents/{+path}","compare_url":"https://api.github.com/repos/ampproject/amphtml/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ampproject/amphtml/merges","archive_url":"https://api.github.com/repos/ampproject/amphtml/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ampproject/amphtml/downloads","issues_url":"https://api.github.com/repos/ampproject/amphtml/issues{/number}","pulls_url":"https://api.github.com/repos/ampproject/amphtml/pulls{/number}","milestones_url":"https://api.github.com/repos/ampproject/amphtml/milestones{/number}","notifications_url":"https://api.github.com/repos/ampproject/amphtml/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ampproject/amphtml/labels{/name}","releases_url":"https://api.github.com/repos/ampproject/amphtml/releases{/id}","deployments_url":"https://api.github.com/repos/ampproject/amphtml/deployments","created_at":"2015-09-01T22:10:53Z","updated_at":"2016-05-09T12:32:11Z","pushed_at":"2016-05-09T17:02:03Z","git_url":"git://github.com/ampproject/amphtml.git","ssh_url":"git@github.com:ampproject/amphtml.git","clone_url":"https://github.com/ampproject/amphtml.git","svn_url":"https://github.com/ampproject/amphtml","homepage":"https://ampproject.org","size":86084,"stargazers_count":7373,"watchers_count":7373,"language":"JavaScript","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":974,"mirror_url":null,"open_issues_count":420,"forks":974,"open_issues":420,"watchers":7373,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/3162"},"html":{"href":"https://github.com/ampproject/amphtml/pull/3162"},"issue":{"href":"https://api.github.com/repos/ampproject/amphtml/issues/3162"},"comments":{"href":"https://api.github.com/repos/ampproject/amphtml/issues/3162/comments"},"review_comments":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/3162/comments"},"review_comment":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/3162/commits"},"statuses":{"href":"https://api.github.com/repos/ampproject/amphtml/statuses/4ff5c835dc09815320fa61df7b9677f8908b225d"}}}}