OLD | NEW |
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.contextmenu; | 5 package org.chromium.chrome.browser.contextmenu; |
6 | 6 |
7 import android.content.Context; | 7 import android.content.Context; |
8 import android.os.Build; | 8 import android.os.Build; |
9 import android.text.TextUtils; | 9 import android.text.TextUtils; |
10 import android.view.ContextMenu; | 10 import android.view.ContextMenu; |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 mDelegate.onSaveToClipboard(params.getLinkText(), false); | 112 mDelegate.onSaveToClipboard(params.getLinkText(), false); |
113 } else if (itemId == R.id.contextmenu_save_image || | 113 } else if (itemId == R.id.contextmenu_save_image || |
114 itemId == R.id.contextmenu_save_video) { | 114 itemId == R.id.contextmenu_save_video) { |
115 if (mDelegate.startDownload(false)) helper.startContextMenuDownload(
false); | 115 if (mDelegate.startDownload(false)) helper.startContextMenuDownload(
false); |
116 } else if (itemId == R.id.contextmenu_save_link_as) { | 116 } else if (itemId == R.id.contextmenu_save_link_as) { |
117 if (mDelegate.startDownload(true)) helper.startContextMenuDownload(t
rue); | 117 if (mDelegate.startDownload(true)) helper.startContextMenuDownload(t
rue); |
118 } else if (itemId == R.id.contextmenu_search_by_image) { | 118 } else if (itemId == R.id.contextmenu_search_by_image) { |
119 mDelegate.onSearchByImageInNewTab(); | 119 mDelegate.onSearchByImageInNewTab(); |
120 } else if (itemId == R.id.contextmenu_copy_image) { | 120 } else if (itemId == R.id.contextmenu_copy_image) { |
121 mDelegate.onSaveImageToClipboard(params.getSrcUrl()); | 121 mDelegate.onSaveImageToClipboard(params.getSrcUrl()); |
| 122 } else if (itemId == R.id.contextmenu_copy_image_url) { |
| 123 mDelegate.onSaveToClipboard(params.getSrcUrl(), true); |
122 } else { | 124 } else { |
123 assert false; | 125 assert false; |
124 } | 126 } |
125 | 127 |
126 return true; | 128 return true; |
127 } | 129 } |
128 } | 130 } |
OLD | NEW |