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

Side by Side Diff: android_webview/native/aw_web_contents_delegate.cc

Issue 14314022: android_webview: Use base::MessageLoop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "android_webview/native/aw_web_contents_delegate.h" 5 #include "android_webview/native/aw_web_contents_delegate.h"
6 6
7 #include "android_webview/browser/aw_javascript_dialog_manager.h" 7 #include "android_webview/browser/aw_javascript_dialog_manager.h"
8 #include "android_webview/browser/find_helper.h" 8 #include "android_webview/browser/find_helper.h"
9 #include "android_webview/native/aw_contents.h" 9 #include "android_webview/native/aw_contents.h"
10 #include "base/android/scoped_java_ref.h" 10 #include "base/android/scoped_java_ref.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 AwContents::FromWebContents(source)->SetPendingWebContentsForPopup( 89 AwContents::FromWebContents(source)->SetPendingWebContentsForPopup(
90 make_scoped_ptr(new_contents)); 90 make_scoped_ptr(new_contents));
91 // Hide the WebContents for the pop up now, we will show it again 91 // Hide the WebContents for the pop up now, we will show it again
92 // when the user calls us back with an AwContents to use to show it. 92 // when the user calls us back with an AwContents to use to show it.
93 new_contents->WasHidden(); 93 new_contents->WasHidden();
94 } else { 94 } else {
95 // The embedder has forgone their chance to display this popup 95 // The embedder has forgone their chance to display this popup
96 // window, so we're done with the WebContents now. We use 96 // window, so we're done with the WebContents now. We use
97 // DeleteSoon as WebContentsImpl may call methods on |new_contents| 97 // DeleteSoon as WebContentsImpl may call methods on |new_contents|
98 // after this method returns. 98 // after this method returns.
99 MessageLoop::current()->DeleteSoon(FROM_HERE, new_contents); 99 base::MessageLoop::current()->DeleteSoon(FROM_HERE, new_contents);
100 } 100 }
101 101
102 if (was_blocked) { 102 if (was_blocked) {
103 *was_blocked = !create_popup; 103 *was_blocked = !create_popup;
104 } 104 }
105 } 105 }
106 106
107 void AwWebContentsDelegate::CloseContents(content::WebContents* source) { 107 void AwWebContentsDelegate::CloseContents(content::WebContents* source) {
108 JNIEnv* env = AttachCurrentThread(); 108 JNIEnv* env = AttachCurrentThread();
109 109
(...skipping 21 matching lines...) Expand all
131 return; 131 return;
132 return Java_AwWebContentsDelegate_updatePreferredSize( 132 return Java_AwWebContentsDelegate_updatePreferredSize(
133 env, obj.obj(), pref_size.width(), pref_size.height()); 133 env, obj.obj(), pref_size.width(), pref_size.height());
134 } 134 }
135 135
136 bool RegisterAwWebContentsDelegate(JNIEnv* env) { 136 bool RegisterAwWebContentsDelegate(JNIEnv* env) {
137 return RegisterNativesImpl(env); 137 return RegisterNativesImpl(env);
138 } 138 }
139 139
140 } // namespace android_webview 140 } // namespace android_webview
OLDNEW
« no previous file with comments | « android_webview/native/aw_contents.cc ('k') | android_webview/renderer/aw_content_renderer_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698