Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Side by Side Diff: Source/web/ContextMenuClientImpl.cpp

Issue 200723010: Rename MediaHasVideo bit to MediaCanToggleControls. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove MediaFullscreen Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | public/web/WebContextMenuData.h » ('j') | public/web/WebContextMenuData.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 if (mediaElement->paused()) 235 if (mediaElement->paused())
236 data.mediaFlags |= WebContextMenuData::MediaPaused; 236 data.mediaFlags |= WebContextMenuData::MediaPaused;
237 if (mediaElement->muted()) 237 if (mediaElement->muted())
238 data.mediaFlags |= WebContextMenuData::MediaMuted; 238 data.mediaFlags |= WebContextMenuData::MediaMuted;
239 if (mediaElement->loop()) 239 if (mediaElement->loop())
240 data.mediaFlags |= WebContextMenuData::MediaLoop; 240 data.mediaFlags |= WebContextMenuData::MediaLoop;
241 if (mediaElement->supportsSave()) 241 if (mediaElement->supportsSave())
242 data.mediaFlags |= WebContextMenuData::MediaCanSave; 242 data.mediaFlags |= WebContextMenuData::MediaCanSave;
243 if (mediaElement->hasAudio()) 243 if (mediaElement->hasAudio())
244 data.mediaFlags |= WebContextMenuData::MediaHasAudio; 244 data.mediaFlags |= WebContextMenuData::MediaHasAudio;
245 if (mediaElement->hasVideo()) 245 if (mediaElement->hasVideo() && !mediaElement->isFullscreen())
246 data.mediaFlags |= WebContextMenuData::MediaHasVideo; 246 data.mediaFlags |= WebContextMenuData::MediaCanToggleControls;
247 if (mediaElement->controls()) 247 if (mediaElement->controls())
248 data.mediaFlags |= WebContextMenuData::MediaControls; 248 data.mediaFlags |= WebContextMenuData::MediaControls;
249 } else if (isHTMLObjectElement(*r.innerNonSharedNode()) || isHTMLEmbedElemen t(*r.innerNonSharedNode())) { 249 } else if (isHTMLObjectElement(*r.innerNonSharedNode()) || isHTMLEmbedElemen t(*r.innerNonSharedNode())) {
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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 outputItems[i] = subItems[i]; 416 outputItems[i] = subItems[i];
417 subMenuItems.swap(outputItems); 417 subMenuItems.swap(outputItems);
418 } 418 }
419 419
420 void ContextMenuClientImpl::populateCustomMenuItems(const WebCore::ContextMenu* defaultMenu, WebContextMenuData* data) 420 void ContextMenuClientImpl::populateCustomMenuItems(const WebCore::ContextMenu* defaultMenu, WebContextMenuData* data)
421 { 421 {
422 populateSubMenuItems(defaultMenu->items(), data->customItems); 422 populateSubMenuItems(defaultMenu->items(), data->customItems);
423 } 423 }
424 424
425 } // namespace blink 425 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | public/web/WebContextMenuData.h » ('j') | public/web/WebContextMenuData.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698