{"action":"created","comment":{"url":"https://api.github.com/repos/crosswalk-project/crosswalk/pulls/comments/24651198","id":24651198,"diff_hunk":"@@ -0,0 +1,34 @@\n+// Copyright (c) 2014 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+package org.xwalk.core;\n+\n+import android.content.Context;\n+\n+import junit.framework.Assert;\n+\n+class XWalkLibraryDelegate {\n+    protected Context mContext;\n+    protected XWalkLibraryListener mLibraryListener;\n+\n+    public static XWalkLibraryDelegate newInstance(Context context, XWalkLibraryListener listener) {\n+        if (XWalkCoreWrapper.getInstance() == null) {\n+            Assert.fail(\"Must call XWalkCoreWrapper.init() first\");\n+        }\n+        if (XWalkCoreWrapper.getInstance().isSharedMode()) {\n+            return new XWalkLibraryDelegate(context, listener);\n+        }\n+        return new XWalkLibraryDelegateEmbedded(context, listener);\n+    }\n+\n+    protected XWalkLibraryDelegate(Context context, XWalkLibraryListener listener) {\n+        mContext = context;\n+        mLibraryListener = listener;\n+    }\n+\n+    public boolean initLibrary() {\n+        if (mLibraryListener != null) mLibraryListener.onXWalkLibraryPrepared();\n+        return true;","path":"runtime/android/core/src/org/xwalk/core/XWalkLibraryDelegate.java","position":32,"original_position":32,"commit_id":"883940d8e5c5955326c87218830581e05c9dfdc7","original_commit_id":"2ce2cbf1bc6c6417a8e817626161bec77ff63647","user":{"login":"halton","id":433218,"avatar_url":"https://avatars.githubusercontent.com/u/433218?v=3","gravatar_id":"","url":"https://api.github.com/users/halton","html_url":"https://github.com/halton","followers_url":"https://api.github.com/users/halton/followers","following_url":"https://api.github.com/users/halton/following{/other_user}","gists_url":"https://api.github.com/users/halton/gists{/gist_id}","starred_url":"https://api.github.com/users/halton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/halton/subscriptions","organizations_url":"https://api.github.com/users/halton/orgs","repos_url":"https://api.github.com/users/halton/repos","events_url":"https://api.github.com/users/halton/events{/privacy}","received_events_url":"https://api.github.com/users/halton/received_events","type":"User","site_admin":false},"body":"Then why define a boolean return value? just void is enough.","created_at":"2015-02-13T08:56:10Z","updated_at":"2015-02-13T08:56:10Z","html_url":"https://github.com/crosswalk-project/crosswalk/pull/2780#discussion_r24651198","pull_request_url":"https://api.github.com/repos/crosswalk-project/crosswalk/pulls/2780","_links":{"self":{"href":"https://api.github.com/repos/crosswalk-project/crosswalk/pulls/comments/24651198"},"html":{"href":"https://github.com/crosswalk-project/crosswalk/pull/2780#discussion_r24651198"},"pull_request":{"href":"https://api.github.com/repos/crosswalk-project/crosswalk/pulls/2780"}}},"pull_request":{"url":"https://api.github.com/repos/crosswalk-project/crosswalk/pulls/2780","id":26941640,"html_url":"https://github.com/crosswalk-project/crosswalk/pull/2780","diff_url":"https://github.com/crosswalk-project/crosswalk/pull/2780.diff","patch_url":"https://github.com/crosswalk-project/crosswalk/pull/2780.patch","issue_url":"https://api.github.com/repos/crosswalk-project/crosswalk/issues/2780","number":2780,"state":"open","locked":false,"title":"[Android] Shared mode implementation","user":{"login":"lincsoon","id":1285835,"avatar_url":"https://avatars.githubusercontent.com/u/1285835?v=3","gravatar_id":"","url":"https://api.github.com/users/lincsoon","html_url":"https://github.com/lincsoon","followers_url":"https://api.github.com/users/lincsoon/followers","following_url":"https://api.github.com/users/lincsoon/following{/other_user}","gists_url":"https://api.github.com/users/lincsoon/gists{/gist_id}","starred_url":"https://api.github.com/users/lincsoon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lincsoon/subscriptions","organizations_url":"https://api.github.com/users/lincsoon/orgs","repos_url":"https://api.github.com/users/lincsoon/repos","events_url":"https://api.github.com/users/lincsoon/events{/privacy}","received_events_url":"https://api.github.com/users/lincsoon/received_events","type":"User","site_admin":false},"body":"Shared mode allows multiple xwalk apps to share one xwalk runtime\r\nlibrary. Each xwalk app is bundled with a thin reflection layer\r\ninstead of the whole runtime library, whereas there is a library\r\napk to be installed on device for xwalk apps to use.\r\n\r\nBUG=XWALK-2948","created_at":"2015-01-07T07:18:51Z","updated_at":"2015-02-13T08:56:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9c003eee61a3345d334c5f261c57ddc13ae122f4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/crosswalk-project/crosswalk/pulls/2780/commits","review_comments_url":"https://api.github.com/repos/crosswalk-project/crosswalk/pulls/2780/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/2780/comments","statuses_url":"https://api.github.com/repos/crosswalk-project/crosswalk/statuses/883940d8e5c5955326c87218830581e05c9dfdc7","head":{"label":"lincsoon:SharedMode","ref":"SharedMode","sha":"883940d8e5c5955326c87218830581e05c9dfdc7","user":{"login":"lincsoon","id":1285835,"avatar_url":"https://avatars.githubusercontent.com/u/1285835?v=3","gravatar_id":"","url":"https://api.github.com/users/lincsoon","html_url":"https://github.com/lincsoon","followers_url":"https://api.github.com/users/lincsoon/followers","following_url":"https://api.github.com/users/lincsoon/following{/other_user}","gists_url":"https://api.github.com/users/lincsoon/gists{/gist_id}","starred_url":"https://api.github.com/users/lincsoon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lincsoon/subscriptions","organizations_url":"https://api.github.com/users/lincsoon/orgs","repos_url":"https://api.github.com/users/lincsoon/repos","events_url":"https://api.github.com/users/lincsoon/events{/privacy}","received_events_url":"https://api.github.com/users/lincsoon/received_events","type":"User","site_admin":false},"repo":{"id":22664891,"name":"crosswalk","full_name":"lincsoon/crosswalk","owner":{"login":"lincsoon","id":1285835,"avatar_url":"https://avatars.githubusercontent.com/u/1285835?v=3","gravatar_id":"","url":"https://api.github.com/users/lincsoon","html_url":"https://github.com/lincsoon","followers_url":"https://api.github.com/users/lincsoon/followers","following_url":"https://api.github.com/users/lincsoon/following{/other_user}","gists_url":"https://api.github.com/users/lincsoon/gists{/gist_id}","starred_url":"https://api.github.com/users/lincsoon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lincsoon/subscriptions","organizations_url":"https://api.github.com/users/lincsoon/orgs","repos_url":"https://api.github.com/users/lincsoon/repos","events_url":"https://api.github.com/users/lincsoon/events{/privacy}","received_events_url":"https://api.github.com/users/lincsoon/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lincsoon/crosswalk","description":"","fork":true,"url":"https://api.github.com/repos/lincsoon/crosswalk","forks_url":"https://api.github.com/repos/lincsoon/crosswalk/forks","keys_url":"https://api.github.com/repos/lincsoon/crosswalk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lincsoon/crosswalk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lincsoon/crosswalk/teams","hooks_url":"https://api.github.com/repos/lincsoon/crosswalk/hooks","issue_events_url":"https://api.github.com/repos/lincsoon/crosswalk/issues/events{/number}","events_url":"https://api.github.com/repos/lincsoon/crosswalk/events","assignees_url":"https://api.github.com/repos/lincsoon/crosswalk/assignees{/user}","branches_url":"https://api.github.com/repos/lincsoon/crosswalk/branches{/branch}","tags_url":"https://api.github.com/repos/lincsoon/crosswalk/tags","blobs_url":"https://api.github.com/repos/lincsoon/crosswalk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lincsoon/crosswalk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lincsoon/crosswalk/git/refs{/sha}","trees_url":"https://api.github.com/repos/lincsoon/crosswalk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lincsoon/crosswalk/statuses/{sha}","languages_url":"https://api.github.com/repos/lincsoon/crosswalk/languages","stargazers_url":"https://api.github.com/repos/lincsoon/crosswalk/stargazers","contributors_url":"https://api.github.com/repos/lincsoon/crosswalk/contributors","subscribers_url":"https://api.github.com/repos/lincsoon/crosswalk/subscribers","subscription_url":"https://api.github.com/repos/lincsoon/crosswalk/subscription","commits_url":"https://api.github.com/repos/lincsoon/crosswalk/commits{/sha}","git_commits_url":"https://api.github.com/repos/lincsoon/crosswalk/git/commits{/sha}","comments_url":"https://api.github.com/repos/lincsoon/crosswalk/comments{/number}","issue_comment_url":"https://api.github.com/repos/lincsoon/crosswalk/issues/comments/{number}","contents_url":"https://api.github.com/repos/lincsoon/crosswalk/contents/{+path}","compare_url":"https://api.github.com/repos/lincsoon/crosswalk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lincsoon/crosswalk/merges","archive_url":"https://api.github.com/repos/lincsoon/crosswalk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lincsoon/crosswalk/downloads","issues_url":"https://api.github.com/repos/lincsoon/crosswalk/issues{/number}","pulls_url":"https://api.github.com/repos/lincsoon/crosswalk/pulls{/number}","milestones_url":"https://api.github.com/repos/lincsoon/crosswalk/milestones{/number}","notifications_url":"https://api.github.com/repos/lincsoon/crosswalk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lincsoon/crosswalk/labels{/name}","releases_url":"https://api.github.com/repos/lincsoon/crosswalk/releases{/id}","created_at":"2014-08-06T01:04:55Z","updated_at":"2014-12-30T03:02:53Z","pushed_at":"2015-02-13T01:47:34Z","git_url":"git://github.com/lincsoon/crosswalk.git","ssh_url":"git@github.com:lincsoon/crosswalk.git","clone_url":"https://github.com/lincsoon/crosswalk.git","svn_url":"https://github.com/lincsoon/crosswalk","homepage":"https://crosswalk-project.org/","size":470296,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"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":"08b7b07f4993a22ee2a02b069f661e31fd2478ad","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-02-13T04:36:03Z","pushed_at":"2015-02-12T18:41:51Z","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":134931,"stargazers_count":631,"watchers_count":631,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":212,"mirror_url":null,"open_issues_count":111,"forks":212,"open_issues":111,"watchers":631,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/crosswalk-project/crosswalk/pulls/2780"},"html":{"href":"https://github.com/crosswalk-project/crosswalk/pull/2780"},"issue":{"href":"https://api.github.com/repos/crosswalk-project/crosswalk/issues/2780"},"comments":{"href":"https://api.github.com/repos/crosswalk-project/crosswalk/issues/2780/comments"},"review_comments":{"href":"https://api.github.com/repos/crosswalk-project/crosswalk/pulls/2780/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/2780/commits"},"statuses":{"href":"https://api.github.com/repos/crosswalk-project/crosswalk/statuses/883940d8e5c5955326c87218830581e05c9dfdc7"}}}}