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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenuHandler.java

Issue 2821223004: [Home] Show the app menu icons as a footer (Closed)
Patch Set: Changes from tedchoc@ review Created 3 years, 8 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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.chrome.browser.appmenu; 5 package org.chromium.chrome.browser.appmenu;
6 6
7 import android.annotation.SuppressLint; 7 import android.annotation.SuppressLint;
8 import android.app.Activity; 8 import android.app.Activity;
9 import android.content.res.TypedArray; 9 import android.content.res.TypedArray;
10 import android.graphics.Point; 10 import android.graphics.Point;
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 Point pt = new Point(); 158 Point pt = new Point();
159 mActivity.getWindowManager().getDefaultDisplay().getSize(pt); 159 mActivity.getWindowManager().getDefaultDisplay().getSize(pt);
160 160
161 int footerResourceId = 0; 161 int footerResourceId = 0;
162 if (mDelegate.shouldShowFooter(appRect.height())) { 162 if (mDelegate.shouldShowFooter(appRect.height())) {
163 footerResourceId = mDelegate.getFooterResourceId(); 163 footerResourceId = mDelegate.getFooterResourceId();
164 } 164 }
165 mAppMenu.show(wrapper, anchorView, isByPermanentButton, rotation, appRec t, pt.y, 165 mAppMenu.show(wrapper, anchorView, isByPermanentButton, rotation, appRec t, pt.y,
166 footerResourceId, mHighlightMenuId); 166 footerResourceId, mHighlightMenuId);
167 mAppMenuDragHelper.onShow(startDragging); 167 mAppMenuDragHelper.onShow(startDragging);
168 mDelegate.onShow(mAppMenu);
168 setMenuHighlight(null); 169 setMenuHighlight(null);
169 RecordUserAction.record("MobileMenuShow"); 170 RecordUserAction.record("MobileMenuShow");
170 return true; 171 return true;
171 } 172 }
172 173
173 void appMenuDismissed() { 174 void appMenuDismissed() {
174 mAppMenuDragHelper.finishDragging(); 175 mAppMenuDragHelper.finishDragging();
175 } 176 }
176 177
177 /** 178 /**
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 /** 223 /**
223 * Called by AppMenu to report that the App Menu visibility has changed. 224 * Called by AppMenu to report that the App Menu visibility has changed.
224 * @param isVisible Whether the App Menu is showing. 225 * @param isVisible Whether the App Menu is showing.
225 */ 226 */
226 void onMenuVisibilityChanged(boolean isVisible) { 227 void onMenuVisibilityChanged(boolean isVisible) {
227 for (int i = 0; i < mObservers.size(); ++i) { 228 for (int i = 0; i < mObservers.size(); ++i) {
228 mObservers.get(i).onMenuVisibilityChanged(isVisible); 229 mObservers.get(i).onMenuVisibilityChanged(isVisible);
229 } 230 }
230 } 231 }
231 } 232 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698