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

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

Issue 2623023002: Remove //chrome as an embedder of blimp. (Closed)
Patch Set: One more rebase for good measure Created 3 years, 11 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
« no previous file with comments | « chrome/browser/android/tab_android.h ('k') | chrome/browser/prefs/chrome_command_line_pref_store.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/tab_android.cc
diff --git a/chrome/browser/android/tab_android.cc b/chrome/browser/android/tab_android.cc
index 4ec05013a0dad2c83b0a887fdcc6b68261d492fb..7489cfe3ad26096de68d4ce1f8a1b358224fc89d 100644
--- a/chrome/browser/android/tab_android.cc
+++ b/chrome/browser/android/tab_android.cc
@@ -11,12 +11,7 @@
#include "base/memory/ptr_util.h"
#include "base/metrics/histogram_macros.h"
#include "base/trace_event/trace_event.h"
-#include "blimp/client/public/blimp_client_context.h"
-#include "blimp/client/public/contents/blimp_contents.h"
-#include "blimp/client/public/contents/blimp_contents_view.h"
-#include "blimp/client/public/contents/blimp_navigation_controller.h"
#include "cc/layers/layer.h"
-#include "chrome/browser/android/blimp/blimp_client_context_factory.h"
#include "chrome/browser/android/compositor/tab_content_manager.h"
#include "chrome/browser/android/metrics/uma_utils.h"
#include "chrome/browser/android/offline_pages/offline_page_bridge.h"
@@ -368,41 +363,7 @@ void TabAndroid::InitWebContents(
// off the record state.
CHECK_EQ(GetProfile()->IsOffTheRecord(), incognito);
- if (!blimp_contents_)
- content_layer_->InsertChild(web_contents_->GetNativeView()->GetLayer(), 0);
-}
-
-base::android::ScopedJavaLocalRef<jobject> TabAndroid::InitBlimpContents(
- JNIEnv* env,
- const JavaParamRef<jobject>& obj,
- 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);
- ui::WindowAndroid* window =
- reinterpret_cast<ui::WindowAndroid*>(window_android_ptr);
- blimp_contents_ = context->CreateBlimpContents(window);
- // If creating a BlimpContents failed, fall back to WebContents-based by
- // doing an early out here.
- if (!blimp_contents_)
- return nullptr;
-
- // Let's detach the layer from WebContents first, just to be sure.
- if (web_contents_ && web_contents_->GetNativeView() &&
- web_contents_->GetNativeView()->GetLayer()) {
- cc::Layer* web_contents_layer = web_contents_->GetNativeView()->GetLayer();
- if (web_contents_layer->parent() == content_layer_.get())
- web_contents_layer->RemoveFromParent();
- }
-
- // Attach the layer holding the tab contents to the |content_layer_|.
- content_layer_->InsertChild(
- blimp_contents_->GetView()->GetNativeView()->GetLayer(), 0);
-
- return blimp_contents_->GetJavaObject();
+ content_layer_->InsertChild(web_contents_->GetNativeView()->GetLayer(), 0);
}
void TabAndroid::UpdateDelegates(
@@ -528,11 +489,6 @@ TabAndroid::TabLoadStatus TabAndroid::LoadUrl(
content::RecordAction(base::UserMetricsAction("ShowHistory"));
}
- if (blimp_contents()) {
- blimp_contents()->GetNavigationController().LoadURL(fixed_url);
- return DEFAULT_PAGE_LOAD;
- }
-
content::NavigationController::LoadURLParams load_params(fixed_url);
if (j_extra_headers) {
load_params.extra_headers = base::android::ConvertJavaStringToUTF8(
« no previous file with comments | « chrome/browser/android/tab_android.h ('k') | chrome/browser/prefs/chrome_command_line_pref_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698