{"action":"created","comment":{"url":"https://api.github.com/repos/crosswalk-project/crosswalk/pulls/comments/41146220","id":41146220,"diff_hunk":"@@ -0,0 +1,105 @@\n+// Copyright 2013 The Chromium Authors. All rights reserved.\n+// Copyright 2015 Intel Corporation. All rights reserved.\n+// Use of this source code is governed by a BSD-style license that can be\n+// found in the LICENSE file.\n+\n+#ifndef XWALK_RUNTIME_BROWSER_DEVTOOLS_XWALK_DEVTOOLS_FRONTEND_H_\n+#define XWALK_RUNTIME_BROWSER_DEVTOOLS_XWALK_DEVTOOLS_FRONTEND_H_\n+\n+#include <map>\n+#include <string>\n+\n+#include \"base/basictypes.h\"\n+#include \"base/compiler_specific.h\"\n+#include \"base/memory/ref_counted.h\"\n+#include \"base/memory/scoped_ptr.h\"\n+#include \"base/memory/weak_ptr.h\"\n+#include \"base/values.h\"\n+#include \"content/public/browser/devtools_agent_host.h\"\n+#include \"content/public/browser/devtools_frontend_host.h\"\n+#include \"content/public/browser/web_contents_observer.h\"\n+#include \"net/url_request/url_fetcher_delegate.h\"\n+#include \"xwalk/runtime/browser/runtime.h\"\n+\n+namespace base {\n+class Value;\n+}\n+\n+namespace content {\n+class RenderViewHost;\n+class WebContents;\n+}\n+\n+namespace xwalk {\n+\n+class NativeAppWindowDesktop;\n+\n+class XWalkDevToolsFrontend : public content::WebContentsObserver,\n+                              public content::DevToolsFrontendHost::Delegate,\n+                              public content::DevToolsAgentHostClient,\n+                              public net::URLFetcherDelegate,\n+                              public Runtime::Observer {\n+ public:\n+  static XWalkDevToolsFrontend* Show(content::WebContents* inspected_contents);\n+\n+  void Activate();\n+  void Focus();\n+  void InspectElementAt(int x, int y);\n+  void Close();\n+\n+  void DisconnectFromTarget();\n+\n+  NativeAppWindowDesktop* frontend_shell() const { return runtime_window_; }\n+\n+  void CallClientFunction(const std::string& function_name,\n+                          const base::Value* arg1,\n+                          const base::Value* arg2,\n+                          const base::Value* arg3);\n+\n+ protected:\n+  XWalkDevToolsFrontend(NativeAppWindowDesktop* runtime_window,\n+                        content::WebContents* inspected_contents);\n+  ~XWalkDevToolsFrontend() override;\n+\n+  void OnRuntimeClosed(Runtime* runtime) override;\n+  void OnNewRuntimeAdded(Runtime* runtime) override {};","path":"runtime/browser/devtools/xwalk_devtools_frontend.h","position":65,"original_position":65,"commit_id":"cf1c668b446cdeeecb386184adce8e3ef1a4b3cf","original_commit_id":"cf1c668b446cdeeecb386184adce8e3ef1a4b3cf","user":{"login":"pozdnyakov","id":998253,"avatar_url":"https://avatars.githubusercontent.com/u/998253?v=3","gravatar_id":"","url":"https://api.github.com/users/pozdnyakov","html_url":"https://github.com/pozdnyakov","followers_url":"https://api.github.com/users/pozdnyakov/followers","following_url":"https://api.github.com/users/pozdnyakov/following{/other_user}","gists_url":"https://api.github.com/users/pozdnyakov/gists{/gist_id}","starred_url":"https://api.github.com/users/pozdnyakov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pozdnyakov/subscriptions","organizations_url":"https://api.github.com/users/pozdnyakov/orgs","repos_url":"https://api.github.com/users/pozdnyakov/repos","events_url":"https://api.github.com/users/pozdnyakov/events{/privacy}","received_events_url":"https://api.github.com/users/pozdnyakov/received_events","type":"User","site_admin":false},"body":"cannot it be omitted?","created_at":"2015-10-05T13:59:38Z","updated_at":"2015-10-05T13:59:38Z","html_url":"https://github.com/crosswalk-project/crosswalk/pull/3293#discussion_r41146220","pull_request_url":"https://api.github.com/repos/crosswalk-project/crosswalk/pulls/3293","_links":{"self":{"href":"https://api.github.com/repos/crosswalk-project/crosswalk/pulls/comments/41146220"},"html":{"href":"https://github.com/crosswalk-project/crosswalk/pull/3293#discussion_r41146220"},"pull_request":{"href":"https://api.github.com/repos/crosswalk-project/crosswalk/pulls/3293"}}},"pull_request":{"url":"https://api.github.com/repos/crosswalk-project/crosswalk/pulls/3293","id":46659608,"html_url":"https://github.com/crosswalk-project/crosswalk/pull/3293","diff_url":"https://github.com/crosswalk-project/crosswalk/pull/3293.diff","patch_url":"https://github.com/crosswalk-project/crosswalk/pull/3293.patch","issue_url":"https://api.github.com/repos/crosswalk-project/crosswalk/issues/3293","number":3293,"state":"open","locked":false,"title":" Implement web inspector for our desktop platforms.","user":{"login":"darktears","id":739895,"avatar_url":"https://avatars.githubusercontent.com/u/739895?v=3","gravatar_id":"","url":"https://api.github.com/users/darktears","html_url":"https://github.com/darktears","followers_url":"https://api.github.com/users/darktears/followers","following_url":"https://api.github.com/users/darktears/following{/other_user}","gists_url":"https://api.github.com/users/darktears/gists{/gist_id}","starred_url":"https://api.github.com/users/darktears/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/darktears/subscriptions","organizations_url":"https://api.github.com/users/darktears/orgs","repos_url":"https://api.github.com/users/darktears/repos","events_url":"https://api.github.com/users/darktears/events{/privacy}","received_events_url":"https://api.github.com/users/darktears/received_events","type":"User","site_admin":false},"body":"This include Windows and Linux. It enables the right click to inspect an element. It will launch a new window where the inspector will be loaded.\r\n\r\nThis is a different workflow than Android where it's remote debugging over USB where you debug on your desktop Chrome.\r\n\r\nI removed xwalk_devtools_delegate, these files were used in xwalk_content_browser_client but beside returning a instance to ContentClient it was doing nothing. I fail to see what it was doing before. Anyway it's now covered by the new implementation.\r\n\r\nBUG=XWALK-4858","created_at":"2015-10-02T17:19:49Z","updated_at":"2015-10-05T13:59:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"894fcfb95d6c85a53810f02617f64bc33317a7b7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/crosswalk-project/crosswalk/pulls/3293/commits","review_comments_url":"https://api.github.com/repos/crosswalk-project/crosswalk/pulls/3293/comments","review_comment_url":"https://api.github.com/repos/crosswalk-project/crosswalk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/crosswalk-project/crosswalk/issues/3293/comments","statuses_url":"https://api.github.com/repos/crosswalk-project/crosswalk/statuses/cf1c668b446cdeeecb386184adce8e3ef1a4b3cf","head":{"label":"darktears:remote-debugging","ref":"remote-debugging","sha":"cf1c668b446cdeeecb386184adce8e3ef1a4b3cf","user":{"login":"darktears","id":739895,"avatar_url":"https://avatars.githubusercontent.com/u/739895?v=3","gravatar_id":"","url":"https://api.github.com/users/darktears","html_url":"https://github.com/darktears","followers_url":"https://api.github.com/users/darktears/followers","following_url":"https://api.github.com/users/darktears/following{/other_user}","gists_url":"https://api.github.com/users/darktears/gists{/gist_id}","starred_url":"https://api.github.com/users/darktears/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/darktears/subscriptions","organizations_url":"https://api.github.com/users/darktears/orgs","repos_url":"https://api.github.com/users/darktears/repos","events_url":"https://api.github.com/users/darktears/events{/privacy}","received_events_url":"https://api.github.com/users/darktears/received_events","type":"User","site_admin":false},"repo":{"id":11104701,"name":"crosswalk","full_name":"darktears/crosswalk","owner":{"login":"darktears","id":739895,"avatar_url":"https://avatars.githubusercontent.com/u/739895?v=3","gravatar_id":"","url":"https://api.github.com/users/darktears","html_url":"https://github.com/darktears","followers_url":"https://api.github.com/users/darktears/followers","following_url":"https://api.github.com/users/darktears/following{/other_user}","gists_url":"https://api.github.com/users/darktears/gists{/gist_id}","starred_url":"https://api.github.com/users/darktears/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/darktears/subscriptions","organizations_url":"https://api.github.com/users/darktears/orgs","repos_url":"https://api.github.com/users/darktears/repos","events_url":"https://api.github.com/users/darktears/events{/privacy}","received_events_url":"https://api.github.com/users/darktears/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/darktears/crosswalk","description":"","fork":true,"url":"https://api.github.com/repos/darktears/crosswalk","forks_url":"https://api.github.com/repos/darktears/crosswalk/forks","keys_url":"https://api.github.com/repos/darktears/crosswalk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/darktears/crosswalk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/darktears/crosswalk/teams","hooks_url":"https://api.github.com/repos/darktears/crosswalk/hooks","issue_events_url":"https://api.github.com/repos/darktears/crosswalk/issues/events{/number}","events_url":"https://api.github.com/repos/darktears/crosswalk/events","assignees_url":"https://api.github.com/repos/darktears/crosswalk/assignees{/user}","branches_url":"https://api.github.com/repos/darktears/crosswalk/branches{/branch}","tags_url":"https://api.github.com/repos/darktears/crosswalk/tags","blobs_url":"https://api.github.com/repos/darktears/crosswalk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/darktears/crosswalk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/darktears/crosswalk/git/refs{/sha}","trees_url":"https://api.github.com/repos/darktears/crosswalk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/darktears/crosswalk/statuses/{sha}","languages_url":"https://api.github.com/repos/darktears/crosswalk/languages","stargazers_url":"https://api.github.com/repos/darktears/crosswalk/stargazers","contributors_url":"https://api.github.com/repos/darktears/crosswalk/contributors","subscribers_url":"https://api.github.com/repos/darktears/crosswalk/subscribers","subscription_url":"https://api.github.com/repos/darktears/crosswalk/subscription","commits_url":"https://api.github.com/repos/darktears/crosswalk/commits{/sha}","git_commits_url":"https://api.github.com/repos/darktears/crosswalk/git/commits{/sha}","comments_url":"https://api.github.com/repos/darktears/crosswalk/comments{/number}","issue_comment_url":"https://api.github.com/repos/darktears/crosswalk/issues/comments{/number}","contents_url":"https://api.github.com/repos/darktears/crosswalk/contents/{+path}","compare_url":"https://api.github.com/repos/darktears/crosswalk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/darktears/crosswalk/merges","archive_url":"https://api.github.com/repos/darktears/crosswalk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/darktears/crosswalk/downloads","issues_url":"https://api.github.com/repos/darktears/crosswalk/issues{/number}","pulls_url":"https://api.github.com/repos/darktears/crosswalk/pulls{/number}","milestones_url":"https://api.github.com/repos/darktears/crosswalk/milestones{/number}","notifications_url":"https://api.github.com/repos/darktears/crosswalk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/darktears/crosswalk/labels{/name}","releases_url":"https://api.github.com/repos/darktears/crosswalk/releases{/id}","created_at":"2013-07-01T19:28:47Z","updated_at":"2015-03-27T19:28:40Z","pushed_at":"2015-10-02T21:05:00Z","git_url":"git://github.com/darktears/crosswalk.git","ssh_url":"git@github.com:darktears/crosswalk.git","clone_url":"https://github.com/darktears/crosswalk.git","svn_url":"https://github.com/darktears/crosswalk","homepage":"","size":15128,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"crosswalk-project:master","ref":"master","sha":"5161e838078854c0198aac656a065b3a54c72ecd","user":{"login":"crosswalk-project","id":4867377,"avatar_url":"https://avatars.githubusercontent.com/u/4867377?v=3","gravatar_id":"","url":"https://api.github.com/users/crosswalk-project","html_url":"https://github.com/crosswalk-project","followers_url":"https://api.github.com/users/crosswalk-project/followers","following_url":"https://api.github.com/users/crosswalk-project/following{/other_user}","gists_url":"https://api.github.com/users/crosswalk-project/gists{/gist_id}","starred_url":"https://api.github.com/users/crosswalk-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crosswalk-project/subscriptions","organizations_url":"https://api.github.com/users/crosswalk-project/orgs","repos_url":"https://api.github.com/users/crosswalk-project/repos","events_url":"https://api.github.com/users/crosswalk-project/events{/privacy}","received_events_url":"https://api.github.com/users/crosswalk-project/received_events","type":"Organization","site_admin":false},"repo":{"id":9207280,"name":"crosswalk","full_name":"crosswalk-project/crosswalk","owner":{"login":"crosswalk-project","id":4867377,"avatar_url":"https://avatars.githubusercontent.com/u/4867377?v=3","gravatar_id":"","url":"https://api.github.com/users/crosswalk-project","html_url":"https://github.com/crosswalk-project","followers_url":"https://api.github.com/users/crosswalk-project/followers","following_url":"https://api.github.com/users/crosswalk-project/following{/other_user}","gists_url":"https://api.github.com/users/crosswalk-project/gists{/gist_id}","starred_url":"https://api.github.com/users/crosswalk-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crosswalk-project/subscriptions","organizations_url":"https://api.github.com/users/crosswalk-project/orgs","repos_url":"https://api.github.com/users/crosswalk-project/repos","events_url":"https://api.github.com/users/crosswalk-project/events{/privacy}","received_events_url":"https://api.github.com/users/crosswalk-project/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/crosswalk-project/crosswalk","description":"","fork":false,"url":"https://api.github.com/repos/crosswalk-project/crosswalk","forks_url":"https://api.github.com/repos/crosswalk-project/crosswalk/forks","keys_url":"https://api.github.com/repos/crosswalk-project/crosswalk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/crosswalk-project/crosswalk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/crosswalk-project/crosswalk/teams","hooks_url":"https://api.github.com/repos/crosswalk-project/crosswalk/hooks","issue_events_url":"https://api.github.com/repos/crosswalk-project/crosswalk/issues/events{/number}","events_url":"https://api.github.com/repos/crosswalk-project/crosswalk/events","assignees_url":"https://api.github.com/repos/crosswalk-project/crosswalk/assignees{/user}","branches_url":"https://api.github.com/repos/crosswalk-project/crosswalk/branches{/branch}","tags_url":"https://api.github.com/repos/crosswalk-project/crosswalk/tags","blobs_url":"https://api.github.com/repos/crosswalk-project/crosswalk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/crosswalk-project/crosswalk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/crosswalk-project/crosswalk/git/refs{/sha}","trees_url":"https://api.github.com/repos/crosswalk-project/crosswalk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/crosswalk-project/crosswalk/statuses/{sha}","languages_url":"https://api.github.com/repos/crosswalk-project/crosswalk/languages","stargazers_url":"https://api.github.com/repos/crosswalk-project/crosswalk/stargazers","contributors_url":"https://api.github.com/repos/crosswalk-project/crosswalk/contributors","subscribers_url":"https://api.github.com/repos/crosswalk-project/crosswalk/subscribers","subscription_url":"https://api.github.com/repos/crosswalk-project/crosswalk/subscription","commits_url":"https://api.github.com/repos/crosswalk-project/crosswalk/commits{/sha}","git_commits_url":"https://api.github.com/repos/crosswalk-project/crosswalk/git/commits{/sha}","comments_url":"https://api.github.com/repos/crosswalk-project/crosswalk/comments{/number}","issue_comment_url":"https://api.github.com/repos/crosswalk-project/crosswalk/issues/comments{/number}","contents_url":"https://api.github.com/repos/crosswalk-project/crosswalk/contents/{+path}","compare_url":"https://api.github.com/repos/crosswalk-project/crosswalk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/crosswalk-project/crosswalk/merges","archive_url":"https://api.github.com/repos/crosswalk-project/crosswalk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/crosswalk-project/crosswalk/downloads","issues_url":"https://api.github.com/repos/crosswalk-project/crosswalk/issues{/number}","pulls_url":"https://api.github.com/repos/crosswalk-project/crosswalk/pulls{/number}","milestones_url":"https://api.github.com/repos/crosswalk-project/crosswalk/milestones{/number}","notifications_url":"https://api.github.com/repos/crosswalk-project/crosswalk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/crosswalk-project/crosswalk/labels{/name}","releases_url":"https://api.github.com/repos/crosswalk-project/crosswalk/releases{/id}","created_at":"2013-04-03T23:30:12Z","updated_at":"2015-10-04T09:06:13Z","pushed_at":"2015-10-05T09:54:29Z","git_url":"git://github.com/crosswalk-project/crosswalk.git","ssh_url":"git@github.com:crosswalk-project/crosswalk.git","clone_url":"https://github.com/crosswalk-project/crosswalk.git","svn_url":"https://github.com/crosswalk-project/crosswalk","homepage":"https://crosswalk-project.org/","size":140146,"stargazers_count":1049,"watchers_count":1049,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":300,"mirror_url":null,"open_issues_count":109,"forks":300,"open_issues":109,"watchers":1049,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/crosswalk-project/crosswalk/pulls/3293"},"html":{"href":"https://github.com/crosswalk-project/crosswalk/pull/3293"},"issue":{"href":"https://api.github.com/repos/crosswalk-project/crosswalk/issues/3293"},"comments":{"href":"https://api.github.com/repos/crosswalk-project/crosswalk/issues/3293/comments"},"review_comments":{"href":"https://api.github.com/repos/crosswalk-project/crosswalk/pulls/3293/comments"},"review_comment":{"href":"https://api.github.com/repos/crosswalk-project/crosswalk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/crosswalk-project/crosswalk/pulls/3293/commits"},"statuses":{"href":"https://api.github.com/repos/crosswalk-project/crosswalk/statuses/cf1c668b446cdeeecb386184adce8e3ef1a4b3cf"}}}}