OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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.shell; | 5 package org.chromium.chrome.shell; |
6 | 6 |
7 import android.annotation.SuppressLint; | |
7 import android.content.Context; | 8 import android.content.Context; |
8 import android.content.res.Configuration; | 9 import android.content.res.Configuration; |
9 import android.graphics.drawable.ClipDrawable; | 10 import android.graphics.drawable.ClipDrawable; |
10 import android.util.AttributeSet; | 11 import android.util.AttributeSet; |
11 import android.view.KeyEvent; | 12 import android.view.KeyEvent; |
12 import android.view.MotionEvent; | 13 import android.view.MotionEvent; |
13 import android.view.View; | 14 import android.view.View; |
14 import android.view.inputmethod.EditorInfo; | 15 import android.view.inputmethod.EditorInfo; |
15 import android.view.inputmethod.InputMethodManager; | 16 import android.view.inputmethod.InputMethodManager; |
16 import android.widget.EditText; | 17 import android.widget.EditText; |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
147 | 148 |
148 private void initializeMenuButton() { | 149 private void initializeMenuButton() { |
149 ImageButton menuButton = (ImageButton) findViewById(R.id.menu_button); | 150 ImageButton menuButton = (ImageButton) findViewById(R.id.menu_button); |
150 menuButton.setOnClickListener(new OnClickListener() { | 151 menuButton.setOnClickListener(new OnClickListener() { |
151 @Override | 152 @Override |
152 public void onClick(View view) { | 153 public void onClick(View view) { |
153 if (mMenuHandler != null) mMenuHandler.showAppMenu(view, false, false); | 154 if (mMenuHandler != null) mMenuHandler.showAppMenu(view, false, false); |
154 } | 155 } |
155 }); | 156 }); |
156 menuButton.setOnTouchListener(new OnTouchListener() { | 157 menuButton.setOnTouchListener(new OnTouchListener() { |
158 @SuppressLint("ClickableViewAccessibility") | |
aurimas (slooooooooow)
2014/08/12 02:47:55
This actually does not fix the bug, just adds a su
| |
157 @Override | 159 @Override |
158 public boolean onTouch(View view, MotionEvent event) { | 160 public boolean onTouch(View view, MotionEvent event) { |
159 return mAppMenuButtonHelper != null && mAppMenuButtonHelper.onTo uch(view, event); | 161 return mAppMenuButtonHelper != null && mAppMenuButtonHelper.onTo uch(view, event); |
160 } | 162 } |
161 }); | 163 }); |
162 } | 164 } |
163 | 165 |
164 /** | 166 /** |
165 * @return Current tab that is shown by ChromeShell. | 167 * @return Current tab that is shown by ChromeShell. |
166 */ | 168 */ |
(...skipping 26 matching lines...) Expand all Loading... | |
193 public void onLoadProgressChanged(Tab tab, int progress) { | 195 public void onLoadProgressChanged(Tab tab, int progress) { |
194 if (tab == mTab) ChromeShellToolbar.this.onLoadProgressChanged(progr ess); | 196 if (tab == mTab) ChromeShellToolbar.this.onLoadProgressChanged(progr ess); |
195 } | 197 } |
196 | 198 |
197 @Override | 199 @Override |
198 public void onUpdateUrl(Tab tab, String url) { | 200 public void onUpdateUrl(Tab tab, String url) { |
199 if (tab == mTab) ChromeShellToolbar.this.onUpdateUrl(url); | 201 if (tab == mTab) ChromeShellToolbar.this.onUpdateUrl(url); |
200 } | 202 } |
201 } | 203 } |
202 } | 204 } |
OLD | NEW |