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

Side by Side Diff: chrome/browser/android/bottombar/overlay_panel_content.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
« no previous file with comments | « no previous file | chrome/browser/android/compositor/tab_content_manager.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 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/android/bottombar/overlay_panel_content.h" 5 #include "chrome/browser/android/bottombar/overlay_panel_content.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/android/jni_string.h" 9 #include "base/android/jni_string.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 void OverlayPanelContent::SetInterceptNavigationDelegate( 123 void OverlayPanelContent::SetInterceptNavigationDelegate(
124 JNIEnv* env, 124 JNIEnv* env,
125 const JavaParamRef<jobject>& obj, 125 const JavaParamRef<jobject>& obj,
126 const JavaParamRef<jobject>& delegate, 126 const JavaParamRef<jobject>& delegate,
127 const JavaParamRef<jobject>& jweb_contents) { 127 const JavaParamRef<jobject>& jweb_contents) {
128 content::WebContents* web_contents = 128 content::WebContents* web_contents =
129 content::WebContents::FromJavaWebContents(jweb_contents); 129 content::WebContents::FromJavaWebContents(jweb_contents);
130 DCHECK(web_contents); 130 DCHECK(web_contents);
131 navigation_interception::InterceptNavigationDelegate::Associate( 131 navigation_interception::InterceptNavigationDelegate::Associate(
132 web_contents, 132 web_contents,
133 base::WrapUnique(new navigation_interception::InterceptNavigationDelegate( 133 base::MakeUnique<navigation_interception::InterceptNavigationDelegate>(
134 env, delegate))); 134 env, delegate));
135 } 135 }
136 136
137 bool RegisterOverlayPanelContent(JNIEnv* env) { 137 bool RegisterOverlayPanelContent(JNIEnv* env) {
138 return RegisterNativesImpl(env); 138 return RegisterNativesImpl(env);
139 } 139 }
140 140
141 jlong Init(JNIEnv* env, const JavaParamRef<jobject>& obj) { 141 jlong Init(JNIEnv* env, const JavaParamRef<jobject>& obj) {
142 OverlayPanelContent* content = new OverlayPanelContent(env, obj); 142 OverlayPanelContent* content = new OverlayPanelContent(env, obj);
143 return reinterpret_cast<intptr_t>(content); 143 return reinterpret_cast<intptr_t>(content);
144 } 144 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/android/compositor/tab_content_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698