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

Side by Side Diff: chrome/browser/android/bottombar/overlay_panel_content.cc

Issue 2394653002: Disable download for overlay panel content (Closed)
Patch Set: rebase Created 4 years, 2 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 | content/browser/renderer_host/render_view_host_delegate.h » ('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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 content::WebContents::FromJavaWebContents(jweb_contents); 93 content::WebContents::FromJavaWebContents(jweb_contents);
94 94
95 DCHECK(web_contents); 95 DCHECK(web_contents);
96 96
97 // NOTE(pedrosimonetti): Takes ownership of the WebContents associated 97 // NOTE(pedrosimonetti): Takes ownership of the WebContents associated
98 // with the ContentViewCore. This is to make sure that the WebContens 98 // with the ContentViewCore. This is to make sure that the WebContens
99 // and the Compositor are in the same process. 99 // and the Compositor are in the same process.
100 // TODO(pedrosimonetti): Confirm with dtrainor@ if the comment above 100 // TODO(pedrosimonetti): Confirm with dtrainor@ if the comment above
101 // is accurate. 101 // is accurate.
102 web_contents_.reset(web_contents); 102 web_contents_.reset(web_contents);
103
104 web_contents_->SetIsOverlayContent(true);
103 // TODO(pedrosimonetti): confirm if we need this after promoting it 105 // TODO(pedrosimonetti): confirm if we need this after promoting it
104 // to a real tab. 106 // to a real tab.
105 TabAndroid::AttachTabHelpers(web_contents_.get()); 107 TabAndroid::AttachTabHelpers(web_contents_.get());
106 web_contents_delegate_.reset( 108 web_contents_delegate_.reset(
107 new web_contents_delegate_android::WebContentsDelegateAndroid( 109 new web_contents_delegate_android::WebContentsDelegateAndroid(
108 env, jweb_contents_delegate)); 110 env, jweb_contents_delegate));
109 web_contents_->SetDelegate(web_contents_delegate_.get()); 111 web_contents_->SetDelegate(web_contents_delegate_.get());
110 ViewAndroidHelper::FromWebContents(web_contents_.get()) 112 ViewAndroidHelper::FromWebContents(web_contents_.get())
111 ->SetViewAndroid(web_contents_->GetNativeView()); 113 ->SetViewAndroid(web_contents_->GetNativeView());
112 } 114 }
(...skipping 22 matching lines...) Expand all
135 } 137 }
136 138
137 bool RegisterOverlayPanelContent(JNIEnv* env) { 139 bool RegisterOverlayPanelContent(JNIEnv* env) {
138 return RegisterNativesImpl(env); 140 return RegisterNativesImpl(env);
139 } 141 }
140 142
141 jlong Init(JNIEnv* env, const JavaParamRef<jobject>& obj) { 143 jlong Init(JNIEnv* env, const JavaParamRef<jobject>& obj) {
142 OverlayPanelContent* content = new OverlayPanelContent(env, obj); 144 OverlayPanelContent* content = new OverlayPanelContent(env, obj);
143 return reinterpret_cast<intptr_t>(content); 145 return reinterpret_cast<intptr_t>(content);
144 } 146 }
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/render_view_host_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698