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

Side by Side Diff: chrome/browser/ui/android/bluetooth_chooser_android.cc

Issue 2209993003: Add missing using statements for JNI types. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/ui/android/bluetooth_chooser_android.h" 5 #include "chrome/browser/ui/android/bluetooth_chooser_android.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_string.h" 8 #include "base/android/jni_string.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/ssl/chrome_security_state_model_client.h" 10 #include "chrome/browser/ssl/chrome_security_state_model_client.h"
11 #include "chrome/common/url_constants.h" 11 #include "chrome/common/url_constants.h"
12 #include "components/url_formatter/elide_url.h" 12 #include "components/url_formatter/elide_url.h"
13 #include "content/public/browser/android/content_view_core.h" 13 #include "content/public/browser/android/content_view_core.h"
14 #include "content/public/browser/render_frame_host.h" 14 #include "content/public/browser/render_frame_host.h"
15 #include "jni/BluetoothChooserDialog_jni.h" 15 #include "jni/BluetoothChooserDialog_jni.h"
16 #include "ui/android/window_android.h" 16 #include "ui/android/window_android.h"
17 #include "url/gurl.h" 17 #include "url/gurl.h"
18 #include "url/origin.h" 18 #include "url/origin.h"
19 19
20 using base::android::AttachCurrentThread; 20 using base::android::AttachCurrentThread;
21 using base::android::ConvertUTF8ToJavaString; 21 using base::android::ConvertUTF8ToJavaString;
22 using base::android::ConvertUTF16ToJavaString; 22 using base::android::ConvertUTF16ToJavaString;
23 using base::android::JavaParamRef;
23 using base::android::ScopedJavaLocalRef; 24 using base::android::ScopedJavaLocalRef;
24 25
25 BluetoothChooserAndroid::BluetoothChooserAndroid( 26 BluetoothChooserAndroid::BluetoothChooserAndroid(
26 content::RenderFrameHost* frame, 27 content::RenderFrameHost* frame,
27 const EventHandler& event_handler) 28 const EventHandler& event_handler)
28 : web_contents_(content::WebContents::FromRenderFrameHost(frame)), 29 : web_contents_(content::WebContents::FromRenderFrameHost(frame)),
29 event_handler_(event_handler) { 30 event_handler_(event_handler) {
30 const url::Origin origin = frame->GetLastCommittedOrigin(); 31 const url::Origin origin = frame->GetLastCommittedOrigin();
31 DCHECK(!origin.unique()); 32 DCHECK(!origin.unique());
32 33
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 // static 166 // static
166 bool BluetoothChooserAndroid::Register(JNIEnv* env) { 167 bool BluetoothChooserAndroid::Register(JNIEnv* env) {
167 return RegisterNativesImpl(env); 168 return RegisterNativesImpl(env);
168 } 169 }
169 170
170 void BluetoothChooserAndroid::OpenURL(const char* url) { 171 void BluetoothChooserAndroid::OpenURL(const char* url) {
171 web_contents_->OpenURL(content::OpenURLParams( 172 web_contents_->OpenURL(content::OpenURLParams(
172 GURL(url), content::Referrer(), NEW_FOREGROUND_TAB, 173 GURL(url), content::Referrer(), NEW_FOREGROUND_TAB,
173 ui::PAGE_TRANSITION_AUTO_TOPLEVEL, false /* is_renderer_initiated */)); 174 ui::PAGE_TRANSITION_AUTO_TOPLEVEL, false /* is_renderer_initiated */));
174 } 175 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698