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

Side by Side Diff: chrome/browser/android/shortcut_helper.cc

Issue 257153003: We have a problem in the process on destroying WebContentsImpl because (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: Rebased onto origin/master again, resolved conflicts Created 6 years, 7 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
« no previous file with comments | « chrome/browser/android/shortcut_helper.h ('k') | chrome/browser/apps/ephemeral_app_launcher.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/android/shortcut_helper.h" 5 #include "chrome/browser/android/shortcut_helper.h"
6 6
7 #include <jni.h> 7 #include <jni.h>
8 8
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "base/android/jni_string.h" 10 #include "base/android/jni_string.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 bool ShortcutBuilder::OnMessageReceived(const IPC::Message& message) { 107 bool ShortcutBuilder::OnMessageReceived(const IPC::Message& message) {
108 bool handled = true; 108 bool handled = true;
109 IPC_BEGIN_MESSAGE_MAP(ShortcutBuilder, message) 109 IPC_BEGIN_MESSAGE_MAP(ShortcutBuilder, message)
110 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_DidRetrieveWebappInformation, 110 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_DidRetrieveWebappInformation,
111 OnDidRetrieveWebappInformation) 111 OnDidRetrieveWebappInformation)
112 IPC_MESSAGE_UNHANDLED(handled = false) 112 IPC_MESSAGE_UNHANDLED(handled = false)
113 IPC_END_MESSAGE_MAP() 113 IPC_END_MESSAGE_MAP()
114 return handled; 114 return handled;
115 } 115 }
116 116
117 void ShortcutBuilder::WebContentsDestroyed(content::WebContents* web_contents) { 117 void ShortcutBuilder::WebContentsDestroyed() {
118 Destroy(); 118 Destroy();
119 } 119 }
120 120
121 void ShortcutBuilder::Destroy() { 121 void ShortcutBuilder::Destroy() {
122 if (cancelable_task_tracker_.HasTrackedTasks()) { 122 if (cancelable_task_tracker_.HasTrackedTasks()) {
123 cancelable_task_tracker_.TryCancelAll(); 123 cancelable_task_tracker_.TryCancelAll();
124 } 124 }
125 delete this; 125 delete this;
126 } 126 }
127 127
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 jclass clazz, 204 jclass clazz,
205 jlong tab_android_ptr, 205 jlong tab_android_ptr,
206 jstring title, 206 jstring title,
207 jint launcher_large_icon_size) { 207 jint launcher_large_icon_size) {
208 TabAndroid* tab = reinterpret_cast<TabAndroid*>(tab_android_ptr); 208 TabAndroid* tab = reinterpret_cast<TabAndroid*>(tab_android_ptr);
209 ShortcutHelper::AddShortcut( 209 ShortcutHelper::AddShortcut(
210 tab->web_contents(), 210 tab->web_contents(),
211 base::android::ConvertJavaStringToUTF16(env, title), 211 base::android::ConvertJavaStringToUTF16(env, title),
212 launcher_large_icon_size); 212 launcher_large_icon_size);
213 } 213 }
OLDNEW
« no previous file with comments | « chrome/browser/android/shortcut_helper.h ('k') | chrome/browser/apps/ephemeral_app_launcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698