| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 if (mediaElement->muted()) | 236 if (mediaElement->muted()) |
| 237 data.mediaFlags |= WebContextMenuData::MediaMuted; | 237 data.mediaFlags |= WebContextMenuData::MediaMuted; |
| 238 if (mediaElement->loop()) | 238 if (mediaElement->loop()) |
| 239 data.mediaFlags |= WebContextMenuData::MediaLoop; | 239 data.mediaFlags |= WebContextMenuData::MediaLoop; |
| 240 if (mediaElement->supportsSave()) | 240 if (mediaElement->supportsSave()) |
| 241 data.mediaFlags |= WebContextMenuData::MediaCanSave; | 241 data.mediaFlags |= WebContextMenuData::MediaCanSave; |
| 242 if (mediaElement->hasAudio()) | 242 if (mediaElement->hasAudio()) |
| 243 data.mediaFlags |= WebContextMenuData::MediaHasAudio; | 243 data.mediaFlags |= WebContextMenuData::MediaHasAudio; |
| 244 if (mediaElement->hasVideo()) | 244 if (mediaElement->hasVideo()) |
| 245 data.mediaFlags |= WebContextMenuData::MediaHasVideo; | 245 data.mediaFlags |= WebContextMenuData::MediaHasVideo; |
| 246 if (mediaElement->controls()) | 246 if (mediaElement->shouldDisplayControls()) |
| 247 data.mediaFlags |= WebContextMenuData::MediaControls; | 247 data.mediaFlags |= WebContextMenuData::MediaControls; |
| 248 } else if (r.innerNonSharedNode()->hasTagName(HTMLNames::objectTag) | 248 } else if (r.innerNonSharedNode()->hasTagName(HTMLNames::objectTag) |
| 249 || r.innerNonSharedNode()->hasTagName(HTMLNames::embedTag)) { | 249 || r.innerNonSharedNode()->hasTagName(HTMLNames::embedTag)) { |
| 250 RenderObject* object = r.innerNonSharedNode()->renderer(); | 250 RenderObject* object = r.innerNonSharedNode()->renderer(); |
| 251 if (object && object->isWidget()) { | 251 if (object && object->isWidget()) { |
| 252 Widget* widget = toRenderWidget(object)->widget(); | 252 Widget* widget = toRenderWidget(object)->widget(); |
| 253 if (widget && widget->isPluginContainer()) { | 253 if (widget && widget->isPluginContainer()) { |
| 254 data.mediaType = WebContextMenuData::MediaTypePlugin; | 254 data.mediaType = WebContextMenuData::MediaTypePlugin; |
| 255 WebPluginContainerImpl* plugin = toWebPluginContainerImpl(widget
); | 255 WebPluginContainerImpl* plugin = toWebPluginContainerImpl(widget
); |
| 256 WebString text = plugin->plugin()->selectionAsText(); | 256 WebString text = plugin->plugin()->selectionAsText(); |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 412 outputItems[i] = subItems[i]; | 412 outputItems[i] = subItems[i]; |
| 413 subMenuItems.swap(outputItems); | 413 subMenuItems.swap(outputItems); |
| 414 } | 414 } |
| 415 | 415 |
| 416 void ContextMenuClientImpl::populateCustomMenuItems(const WebCore::ContextMenu*
defaultMenu, WebContextMenuData* data) | 416 void ContextMenuClientImpl::populateCustomMenuItems(const WebCore::ContextMenu*
defaultMenu, WebContextMenuData* data) |
| 417 { | 417 { |
| 418 populateSubMenuItems(defaultMenu->items(), data->customItems); | 418 populateSubMenuItems(defaultMenu->items(), data->customItems); |
| 419 } | 419 } |
| 420 | 420 |
| 421 } // namespace blink | 421 } // namespace blink |
| OLD | NEW |