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

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

Issue 2334613003: Re-write many calls to WrapUnique() with MakeUnique() (Closed)
Patch Set: Changes from review by sky 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 "chrome/browser/android/tab_web_contents_delegate_android.h" 5 #include "chrome/browser/android/tab_web_contents_delegate_android.h"
6 6
7 #include <stddef.h> 7 #include <stddef.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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 void TabWebContentsDelegateAndroid::RunFileChooser( 121 void TabWebContentsDelegateAndroid::RunFileChooser(
122 content::RenderFrameHost* render_frame_host, 122 content::RenderFrameHost* render_frame_host,
123 const FileChooserParams& params) { 123 const FileChooserParams& params) {
124 FileSelectHelper::RunFileChooser(render_frame_host, params); 124 FileSelectHelper::RunFileChooser(render_frame_host, params);
125 } 125 }
126 126
127 std::unique_ptr<BluetoothChooser> 127 std::unique_ptr<BluetoothChooser>
128 TabWebContentsDelegateAndroid::RunBluetoothChooser( 128 TabWebContentsDelegateAndroid::RunBluetoothChooser(
129 content::RenderFrameHost* frame, 129 content::RenderFrameHost* frame,
130 const BluetoothChooser::EventHandler& event_handler) { 130 const BluetoothChooser::EventHandler& event_handler) {
131 return base::WrapUnique(new BluetoothChooserAndroid(frame, event_handler)); 131 return base::MakeUnique<BluetoothChooserAndroid>(frame, event_handler);
132 } 132 }
133 133
134 void TabWebContentsDelegateAndroid::CloseContents( 134 void TabWebContentsDelegateAndroid::CloseContents(
135 WebContents* web_contents) { 135 WebContents* web_contents) {
136 // Prevent dangling registrations assigned to closed web contents. 136 // Prevent dangling registrations assigned to closed web contents.
137 if (notification_registrar_.IsRegistered(this, 137 if (notification_registrar_.IsRegistered(this,
138 chrome::NOTIFICATION_FIND_RESULT_AVAILABLE, 138 chrome::NOTIFICATION_FIND_RESULT_AVAILABLE,
139 content::Source<WebContents>(web_contents))) { 139 content::Source<WebContents>(web_contents))) {
140 notification_registrar_.Remove(this, 140 notification_registrar_.Remove(this,
141 chrome::NOTIFICATION_FIND_RESULT_AVAILABLE, 141 chrome::NOTIFICATION_FIND_RESULT_AVAILABLE,
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 jboolean IsCapturingVideo(JNIEnv* env, 457 jboolean IsCapturingVideo(JNIEnv* env,
458 const JavaParamRef<jclass>& clazz, 458 const JavaParamRef<jclass>& clazz,
459 const JavaParamRef<jobject>& java_web_contents) { 459 const JavaParamRef<jobject>& java_web_contents) {
460 content::WebContents* web_contents = 460 content::WebContents* web_contents =
461 content::WebContents::FromJavaWebContents(java_web_contents); 461 content::WebContents::FromJavaWebContents(java_web_contents);
462 scoped_refptr<MediaStreamCaptureIndicator> indicator = 462 scoped_refptr<MediaStreamCaptureIndicator> indicator =
463 MediaCaptureDevicesDispatcher::GetInstance()-> 463 MediaCaptureDevicesDispatcher::GetInstance()->
464 GetMediaStreamCaptureIndicator(); 464 GetMediaStreamCaptureIndicator();
465 return indicator->IsCapturingVideo(web_contents); 465 return indicator->IsCapturingVideo(web_contents);
466 } 466 }
OLDNEW
« no previous file with comments | « chrome/browser/android/tab_android.cc ('k') | chrome/browser/android/usb/web_usb_chooser_service_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698