| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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.searchwidget; | 5 package org.chromium.chrome.browser.searchwidget; |
| 6 | 6 |
| 7 import android.content.Intent; | 7 import android.content.Intent; |
| 8 import android.graphics.Rect; | 8 import android.graphics.Rect; |
| 9 import android.graphics.drawable.Drawable; | 9 import android.graphics.drawable.Drawable; |
| 10 import android.net.Uri; | 10 import android.net.Uri; |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 if (mUrlBar != null) focusTextBox(false); | 108 if (mUrlBar != null) focusTextBox(false); |
| 109 | 109 |
| 110 return result; | 110 return result; |
| 111 } | 111 } |
| 112 | 112 |
| 113 @Override | 113 @Override |
| 114 protected void setContentView() { | 114 protected void setContentView() { |
| 115 initializeDimensions(); | 115 initializeDimensions(); |
| 116 | 116 |
| 117 mWindowAndroid = new ActivityWindowAndroid(this); | 117 mWindowAndroid = new ActivityWindowAndroid(this); |
| 118 mSnackbarManager = new SnackbarManager(this); | 118 mSnackbarManager = new SnackbarManager(this, null); |
| 119 mSearchBoxDataProvider = new SearchBoxDataProvider(); | 119 mSearchBoxDataProvider = new SearchBoxDataProvider(); |
| 120 | 120 |
| 121 mContentView = createContentView(mSearchBox); | 121 mContentView = createContentView(mSearchBox); |
| 122 mContentView.setOnClickListener(new View.OnClickListener() { | 122 mContentView.setOnClickListener(new View.OnClickListener() { |
| 123 @Override | 123 @Override |
| 124 public void onClick(View v) { | 124 public void onClick(View v) { |
| 125 // Finish the Activity if the user clicks on the scrim. | 125 // Finish the Activity if the user clicks on the scrim. |
| 126 finish(); | 126 finish(); |
| 127 } | 127 } |
| 128 }); | 128 }); |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 mHandler.post(new Runnable() { | 305 mHandler.post(new Runnable() { |
| 306 @Override | 306 @Override |
| 307 public void run() { | 307 public void run() { |
| 308 mSearchBox.showCachedZeroSuggestResultsIfAvailable(); | 308 mSearchBox.showCachedZeroSuggestResultsIfAvailable(); |
| 309 } | 309 } |
| 310 }); | 310 }); |
| 311 ChromeBrowserInitializer.getInstance(getApplicationContext()) | 311 ChromeBrowserInitializer.getInstance(getApplicationContext()) |
| 312 .handlePreNativeStartup(SearchActivity.this); | 312 .handlePreNativeStartup(SearchActivity.this); |
| 313 } | 313 } |
| 314 } | 314 } |
| OLD | NEW |