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

Unified Diff: chrome/browser/android/tab_android.cc

Issue 2270323004: Add BlimpView to a Chrome tab when Blimp is enabled. (Closed)
Patch Set: Magic now happens 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/android/tab_android.cc
diff --git a/chrome/browser/android/tab_android.cc b/chrome/browser/android/tab_android.cc
index 63cbe9f53e5679bef3c7a9846e7ef3c0b89e8e5a..85800d81d0e1b8235749522dca50327b213d38e6 100644
--- a/chrome/browser/android/tab_android.cc
+++ b/chrome/browser/android/tab_android.cc
@@ -87,6 +87,7 @@
#include "skia/ext/image_operations.h"
#include "third_party/WebKit/public/platform/WebReferrerPolicy.h"
#include "ui/android/view_android.h"
+#include "ui/android/window_android.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/window_open_disposition.h"
#include "ui/display/display.h"
@@ -422,13 +423,16 @@ void TabAndroid::InitWebContents(
base::android::ScopedJavaLocalRef<jobject> TabAndroid::InitBlimpContents(
JNIEnv* env,
const JavaParamRef<jobject>& obj,
- const JavaParamRef<jobject>& j_profile) {
+ const JavaParamRef<jobject>& j_profile,
+ jlong window_android_ptr) {
Profile* profile = ProfileAndroid::FromProfileAndroid(j_profile.obj());
DCHECK(!profile->IsOffTheRecord());
blimp::client::BlimpClientContext* context =
BlimpClientContextFactory::GetForBrowserContext(profile);
DCHECK(context);
- blimp_contents_ = context->CreateBlimpContents();
+ ui::WindowAndroid* window =
+ reinterpret_cast<ui::WindowAndroid*>(window_android_ptr);
+ blimp_contents_ = context->CreateBlimpContents(window);
DCHECK(blimp_contents_);
return blimp_contents_->GetJavaObject();
}

Powered by Google App Engine
This is Rietveld 408576698