| 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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 | 183 |
| 183 private void initializeMenuButton() { | 184 private void initializeMenuButton() { |
| 184 ImageButton menuButton = (ImageButton) findViewById(R.id.menu_button); | 185 ImageButton menuButton = (ImageButton) findViewById(R.id.menu_button); |
| 185 menuButton.setOnClickListener(new OnClickListener() { | 186 menuButton.setOnClickListener(new OnClickListener() { |
| 186 @Override | 187 @Override |
| 187 public void onClick(View view) { | 188 public void onClick(View view) { |
| 188 if (mMenuHandler != null) mMenuHandler.showAppMenu(view, false,
false); | 189 if (mMenuHandler != null) mMenuHandler.showAppMenu(view, false,
false); |
| 189 } | 190 } |
| 190 }); | 191 }); |
| 191 menuButton.setOnTouchListener(new OnTouchListener() { | 192 menuButton.setOnTouchListener(new OnTouchListener() { |
| 193 @SuppressLint("ClickableViewAccessibility") |
| 192 @Override | 194 @Override |
| 193 public boolean onTouch(View view, MotionEvent event) { | 195 public boolean onTouch(View view, MotionEvent event) { |
| 194 return mAppMenuButtonHelper != null && mAppMenuButtonHelper.onTo
uch(view, event); | 196 return mAppMenuButtonHelper != null && mAppMenuButtonHelper.onTo
uch(view, event); |
| 195 } | 197 } |
| 196 }); | 198 }); |
| 197 } | 199 } |
| 198 | 200 |
| 199 private void initializeStopReloadButton() { | 201 private void initializeStopReloadButton() { |
| 200 mStopReloadButton = (ImageButton) findViewById(R.id.stop_reload_button); | 202 mStopReloadButton = (ImageButton) findViewById(R.id.stop_reload_button); |
| 201 mStopReloadButton.setOnClickListener(new OnClickListener() { | 203 mStopReloadButton.setOnClickListener(new OnClickListener() { |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 public void onLoadProgressChanged(Tab tab, int progress) { | 244 public void onLoadProgressChanged(Tab tab, int progress) { |
| 243 if (tab == mTab) ChromeShellToolbar.this.onLoadProgressChanged(progr
ess); | 245 if (tab == mTab) ChromeShellToolbar.this.onLoadProgressChanged(progr
ess); |
| 244 } | 246 } |
| 245 | 247 |
| 246 @Override | 248 @Override |
| 247 public void onUpdateUrl(Tab tab, String url) { | 249 public void onUpdateUrl(Tab tab, String url) { |
| 248 if (tab == mTab) ChromeShellToolbar.this.onUpdateUrl(url); | 250 if (tab == mTab) ChromeShellToolbar.this.onUpdateUrl(url); |
| 249 } | 251 } |
| 250 } | 252 } |
| 251 } | 253 } |
| OLD | NEW |