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

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

Issue 1144463003: Remove Navigation Transitions from Chromium (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed TransitionPageHelper. Created 5 years, 7 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/transition_page_helper.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/transition_page_helper.cc
diff --git a/chrome/browser/android/transition_page_helper.cc b/chrome/browser/android/transition_page_helper.cc
deleted file mode 100644
index 713c3861547dcab8eb2376f45613ec80339fdff0..0000000000000000000000000000000000000000
--- a/chrome/browser/android/transition_page_helper.cc
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/android/transition_page_helper.h"
-
-#include "cc/layers/layer.h"
-#include "chrome/browser/android/tab_android.h"
-#include "chrome/browser/ui/android/window_android_helper.h"
-#include "content/public/browser/android/content_view_core.h"
-#include "content/public/browser/web_contents.h"
-#include "jni/TransitionPageHelper_jni.h"
-
-// TODO(simonhatch): Why does 1.f opacity seem to kill per-pixel alpha?
-const float TRANSITION_MAX_OPACITY = 0.99999f;
-
-TransitionPageHelper* TransitionPageHelper::FromJavaObject(JNIEnv* env,
- jobject jobj) {
- return reinterpret_cast<TransitionPageHelper*>(
- Java_TransitionPageHelper_getNativePtr(env, jobj));
-}
-
-TransitionPageHelper::TransitionPageHelper() {
-}
-
-TransitionPageHelper::~TransitionPageHelper() {
-}
-
-void TransitionPageHelper::Destroy(JNIEnv* env, jobject jobj) {
- delete this;
-}
-
-void TransitionPageHelper::SetWebContents(JNIEnv* env,
- jobject jobj,
- jobject jcontent_view_core) {
- content::ContentViewCore* content_view_core =
- content::ContentViewCore::GetNativeContentViewCore(env,
- jcontent_view_core);
- DCHECK(content_view_core);
- DCHECK(content_view_core->GetWebContents());
-
- web_contents_.reset(content_view_core->GetWebContents());
-}
-
-void TransitionPageHelper::ReleaseWebContents(JNIEnv* env, jobject jobj) {
- DCHECK(web_contents_.get());
- web_contents_.reset();
-}
-
-void TransitionPageHelper::SetOpacity(JNIEnv* env,
- jobject jobj,
- jobject jcontent_view_core,
- jfloat opacity) {
- content::ContentViewCore* content_view_core =
- content::ContentViewCore::GetNativeContentViewCore(env,
- jcontent_view_core);
- if (!content_view_core)
- return;
-
- content_view_core->GetLayer()->SetOpacity(
- std::min(opacity, TRANSITION_MAX_OPACITY));
-}
-
-static jlong Init(JNIEnv* env, jobject obj) {
- return reinterpret_cast<long>(new TransitionPageHelper());
-}
-
-bool TransitionPageHelper::Register(JNIEnv* env) {
- return RegisterNativesImpl(env);
-}
« no previous file with comments | « chrome/browser/android/transition_page_helper.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698