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

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

Issue 2248873002: Convert WindowOpenDisposition to an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 3 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 | « no previous file | blimp/engine/session/blimp_engine_session.cc » ('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 (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 "android_webview/native/aw_contents_io_thread_client_impl.h" 10 #include "android_webview/native/aw_contents_io_thread_client_impl.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 } 131 }
132 132
133 void AwWebContentsDelegate::AddNewContents(WebContents* source, 133 void AwWebContentsDelegate::AddNewContents(WebContents* source,
134 WebContents* new_contents, 134 WebContents* new_contents,
135 WindowOpenDisposition disposition, 135 WindowOpenDisposition disposition,
136 const gfx::Rect& initial_rect, 136 const gfx::Rect& initial_rect,
137 bool user_gesture, 137 bool user_gesture,
138 bool* was_blocked) { 138 bool* was_blocked) {
139 JNIEnv* env = AttachCurrentThread(); 139 JNIEnv* env = AttachCurrentThread();
140 140
141 bool is_dialog = disposition == NEW_POPUP; 141 bool is_dialog = disposition == WindowOpenDisposition::NEW_POPUP;
142 ScopedJavaLocalRef<jobject> java_delegate = GetJavaDelegate(env); 142 ScopedJavaLocalRef<jobject> java_delegate = GetJavaDelegate(env);
143 bool create_popup = false; 143 bool create_popup = false;
144 144
145 if (java_delegate.obj()) { 145 if (java_delegate.obj()) {
146 create_popup = Java_AwWebContentsDelegate_addNewContents( 146 create_popup = Java_AwWebContentsDelegate_addNewContents(
147 env, java_delegate, is_dialog, user_gesture); 147 env, java_delegate, is_dialog, user_gesture);
148 } 148 }
149 149
150 if (create_popup) { 150 if (create_popup) {
151 // The embedder would like to display the popup and we will receive 151 // The embedder would like to display the popup and we will receive
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 DVLOG(0) << "File Chooser result: mode = " << mode 314 DVLOG(0) << "File Chooser result: mode = " << mode
315 << ", file paths = " << base::JoinString(file_path_str, ":"); 315 << ", file paths = " << base::JoinString(file_path_str, ":");
316 rfh->FilesSelectedInChooser(files, mode); 316 rfh->FilesSelectedInChooser(files, mode);
317 } 317 }
318 318
319 bool RegisterAwWebContentsDelegate(JNIEnv* env) { 319 bool RegisterAwWebContentsDelegate(JNIEnv* env) {
320 return RegisterNativesImpl(env); 320 return RegisterNativesImpl(env);
321 } 321 }
322 322
323 } // namespace android_webview 323 } // namespace android_webview
OLDNEW
« no previous file with comments | « no previous file | blimp/engine/session/blimp_engine_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698