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.app.Activity; | 7 import android.app.Activity; |
8 import android.content.Intent; | 8 import android.content.Intent; |
9 import android.os.Bundle; | 9 import android.os.Bundle; |
10 import android.text.TextUtils; | 10 import android.text.TextUtils; |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
346 return true; | 346 return true; |
347 } else if (id == R.id.forward_menu_id) { | 347 } else if (id == R.id.forward_menu_id) { |
348 if (activeTab != null && activeTab.canGoForward()) { | 348 if (activeTab != null && activeTab.canGoForward()) { |
349 activeTab.goForward(); | 349 activeTab.goForward(); |
350 } | 350 } |
351 return true; | 351 return true; |
352 } else if (id == R.id.new_tab_menu_id) { | 352 } else if (id == R.id.new_tab_menu_id) { |
353 mTabManager.createNewTab(); | 353 mTabManager.createNewTab(); |
354 return true; | 354 return true; |
355 } else if (id == R.id.share_menu_id || id == R.id.direct_share_menu_id) { | 355 } else if (id == R.id.share_menu_id || id == R.id.direct_share_menu_id) { |
356 ShareHelper.share(item.getItemId() == R.id.direct_share_menu_id, thi s, | 356 ShareHelper.share(item.getItemId() == R.id.direct_share_menu_id, |
357 activeTab.getTitle(), activeTab.getUrl(), null, | 357 this, activeTab.getTitle(), activeTab.getUrl(), null, |
aurimas (slooooooooow)
2014/11/19 22:43:17
Undo "this" wrapping to the new line as it has not
deepak.db
2014/11/21 10:14:45
Done.
| |
358 Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET); | 358 Intent.FLAG_ACTIVITY_NEW_TASK); |
aurimas (slooooooooow)
2014/11/19 22:43:17
Use ChromeApiCompatibilityUtils.getActivityNewDocu
deepak.db
2014/11/20 07:29:05
Thanks for the reply!
FLAG_ACTIVITY_CLEAR_WHEN_TAS
aurimas (slooooooooow)
2014/11/20 17:24:04
FLAG_ACTIVITY_NEW_DOCUMENT and FLAG_ACTIVITY_NEW_T
deepak.db
2014/11/21 10:14:45
ChromeApiCompatibilityUtils.getActivityNewDocument
| |
359 return true; | 359 return true; |
360 } else { | 360 } else { |
361 return super.onOptionsItemSelected(item); | 361 return super.onOptionsItemSelected(item); |
362 } | 362 } |
363 } | 363 } |
364 | 364 |
365 private void waitForDebuggerIfNeeded() { | 365 private void waitForDebuggerIfNeeded() { |
366 if (CommandLine.getInstance().hasSwitch(BaseSwitches.WAIT_FOR_JAVA_DEBUG GER)) { | 366 if (CommandLine.getInstance().hasSwitch(BaseSwitches.WAIT_FOR_JAVA_DEBUG GER)) { |
367 Log.e(TAG, "Waiting for Java debugger to connect..."); | 367 Log.e(TAG, "Waiting for Java debugger to connect..."); |
368 android.os.Debug.waitForDebugger(); | 368 android.os.Debug.waitForDebugger(); |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
433 @VisibleForTesting | 433 @VisibleForTesting |
434 public static void setActivityWindowAndroidFactory(ActivityWindowAndroidFact ory factory) { | 434 public static void setActivityWindowAndroidFactory(ActivityWindowAndroidFact ory factory) { |
435 sWindowAndroidFactory = factory; | 435 sWindowAndroidFactory = factory; |
436 } | 436 } |
437 | 437 |
438 @VisibleForTesting | 438 @VisibleForTesting |
439 public static void setAppMenuHandlerFactory(AppMenuHandlerFactory factory) { | 439 public static void setAppMenuHandlerFactory(AppMenuHandlerFactory factory) { |
440 sAppMenuHandlerFactory = factory; | 440 sAppMenuHandlerFactory = factory; |
441 } | 441 } |
442 } | 442 } |
OLD | NEW |