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

Side by Side Diff: android_webview/java/src/org/chromium/android_webview/AwViewAndroidDelegate.java

Issue 2218623003: Remove |ContentViewCore.getViewAndroidDelegate()| (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 package org.chromium.android_webview; 5 package org.chromium.android_webview;
6 6
7 import android.view.View; 7 import android.view.View;
8 import android.view.ViewGroup; 8 import android.view.ViewGroup;
9 import android.widget.FrameLayout; 9 import android.widget.FrameLayout;
10 10
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 int topMargin) { 51 int topMargin) {
52 mX = x; 52 mX = x;
53 mY = y; 53 mY = y;
54 mWidth = width; 54 mWidth = width;
55 mHeight = height; 55 mHeight = height;
56 mLeftMargin = leftMargin; 56 mLeftMargin = leftMargin;
57 mTopMargin = topMargin; 57 mTopMargin = topMargin;
58 } 58 }
59 } 59 }
60 60
61 AwViewAndroidDelegate(ViewGroup containerView, RenderCoordinates renderCoord inates) { 61 @VisibleForTesting
62 public AwViewAndroidDelegate(ViewGroup containerView, RenderCoordinates rend erCoordinates) {
62 mContainerView = containerView; 63 mContainerView = containerView;
63 mRenderCoordinates = renderCoordinates; 64 mRenderCoordinates = renderCoordinates;
64 } 65 }
65 66
66 @Override 67 @Override
67 public View acquireView() { 68 public View acquireView() {
68 ViewGroup containerView = getContainerView(); 69 ViewGroup containerView = getContainerView();
69 if (containerView == null) return null; 70 if (containerView == null) return null;
70 View anchorView = new View(containerView.getContext()); 71 View anchorView = new View(containerView.getContext());
71 containerView.addView(anchorView); 72 containerView.addView(anchorView);
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 new android.widget.AbsoluteLayout.LayoutParams( 135 new android.widget.AbsoluteLayout.LayoutParams(
135 scaledWidth, scaledHeight, leftMargin, topMargin); 136 scaledWidth, scaledHeight, leftMargin, topMargin);
136 anchorView.setLayoutParams(lp); 137 anchorView.setLayoutParams(lp);
137 } 138 }
138 139
139 @Override 140 @Override
140 public ViewGroup getContainerView() { 141 public ViewGroup getContainerView() {
141 return mContainerView; 142 return mContainerView;
142 } 143 }
143 } 144 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698