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 #include "chrome/browser/renderer_context_menu/context_menu_content_type.h" | 5 #include "chrome/browser/renderer_context_menu/context_menu_content_type.h" |
6 | 6 |
7 #include "chrome/app/chrome_command_ids.h" | 7 #include "chrome/app/chrome_command_ids.h" |
8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
9 #include "chrome/browser/profiles/profile_io_data.h" | 9 #include "chrome/browser/profiles/profile_io_data.h" |
10 #include "chrome/common/url_constants.h" | 10 #include "chrome/common/url_constants.h" |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 case ITEM_GROUP_SEARCHWEBFORIMAGE: | 120 case ITEM_GROUP_SEARCHWEBFORIMAGE: |
121 // Image menu items imply search web for image item. | 121 // Image menu items imply search web for image item. |
122 return SupportsGroupInternal(ITEM_GROUP_MEDIA_IMAGE); | 122 return SupportsGroupInternal(ITEM_GROUP_MEDIA_IMAGE); |
123 | 123 |
124 case ITEM_GROUP_MEDIA_VIDEO: | 124 case ITEM_GROUP_MEDIA_VIDEO: |
125 return params_.media_type == WebContextMenuData::MediaTypeVideo; | 125 return params_.media_type == WebContextMenuData::MediaTypeVideo; |
126 | 126 |
127 case ITEM_GROUP_MEDIA_AUDIO: | 127 case ITEM_GROUP_MEDIA_AUDIO: |
128 return params_.media_type == WebContextMenuData::MediaTypeAudio; | 128 return params_.media_type == WebContextMenuData::MediaTypeAudio; |
129 | 129 |
| 130 case ITEM_GROUP_MEDIA_CANVAS: |
| 131 return params_.media_type == WebContextMenuData::MediaTypeCanvas; |
| 132 |
130 case ITEM_GROUP_MEDIA_PLUGIN: | 133 case ITEM_GROUP_MEDIA_PLUGIN: |
131 return params_.media_type == WebContextMenuData::MediaTypePlugin; | 134 return params_.media_type == WebContextMenuData::MediaTypePlugin; |
132 | 135 |
133 case ITEM_GROUP_MEDIA_FILE: | 136 case ITEM_GROUP_MEDIA_FILE: |
134 #if defined(WEBCONTEXT_MEDIATYPEFILE_DEFINED) | 137 #if defined(WEBCONTEXT_MEDIATYPEFILE_DEFINED) |
135 return params_.media_type == WebContextMenuData::MediaTypeFile; | 138 return params_.media_type == WebContextMenuData::MediaTypeFile; |
136 #else | 139 #else |
137 return false; | 140 return false; |
138 #endif | 141 #endif |
139 | 142 |
(...skipping 29 matching lines...) Expand all Loading... |
169 return true; | 172 return true; |
170 #else | 173 #else |
171 return false; | 174 return false; |
172 #endif | 175 #endif |
173 | 176 |
174 default: | 177 default: |
175 NOTREACHED(); | 178 NOTREACHED(); |
176 return false; | 179 return false; |
177 } | 180 } |
178 } | 181 } |
OLD | NEW |