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

Side by Side Diff: chrome/renderer/render_view.cc

Issue 251103: Move MediaPlayerAction to WebMediaPlayerAction. Switch to an enum and a... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « chrome/renderer/render_view.h ('k') | webkit/api/public/WebMediaPlayerAction.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/renderer/render_view.h" 5 #include "chrome/renderer/render_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 using WebKit::WebData; 116 using WebKit::WebData;
117 using WebKit::WebDataSource; 117 using WebKit::WebDataSource;
118 using WebKit::WebDragData; 118 using WebKit::WebDragData;
119 using WebKit::WebDragOperation; 119 using WebKit::WebDragOperation;
120 using WebKit::WebDragOperationsMask; 120 using WebKit::WebDragOperationsMask;
121 using WebKit::WebEditingAction; 121 using WebKit::WebEditingAction;
122 using WebKit::WebForm; 122 using WebKit::WebForm;
123 using WebKit::WebFrame; 123 using WebKit::WebFrame;
124 using WebKit::WebHistoryItem; 124 using WebKit::WebHistoryItem;
125 using WebKit::WebMediaPlayer; 125 using WebKit::WebMediaPlayer;
126 using WebKit::WebMediaPlayerAction;
126 using WebKit::WebMediaPlayerClient; 127 using WebKit::WebMediaPlayerClient;
127 using WebKit::WebNavigationPolicy; 128 using WebKit::WebNavigationPolicy;
128 using WebKit::WebNavigationType; 129 using WebKit::WebNavigationType;
129 using WebKit::WebNode; 130 using WebKit::WebNode;
130 using WebKit::WebPlugin; 131 using WebKit::WebPlugin;
131 using WebKit::WebPluginParams; 132 using WebKit::WebPluginParams;
132 using WebKit::WebPoint; 133 using WebKit::WebPoint;
133 using WebKit::WebPopupMenuInfo; 134 using WebKit::WebPopupMenuInfo;
134 using WebKit::WebRange; 135 using WebKit::WebRange;
135 using WebKit::WebRect; 136 using WebKit::WebRect;
(...skipping 2889 matching lines...) Expand 10 before | Expand all | Expand 10 after
3025 3026
3026 void RenderView::OnSetRendererPrefs(const RendererPreferences& renderer_prefs) { 3027 void RenderView::OnSetRendererPrefs(const RendererPreferences& renderer_prefs) {
3027 renderer_preferences_ = renderer_prefs; 3028 renderer_preferences_ = renderer_prefs;
3028 UpdateFontRenderingFromRendererPrefs(); 3029 UpdateFontRenderingFromRendererPrefs();
3029 #if defined(OS_LINUX) 3030 #if defined(OS_LINUX)
3030 WebColorName name = WebKit::WebColorWebkitFocusRingColor; 3031 WebColorName name = WebKit::WebColorWebkitFocusRingColor;
3031 WebKit::setNamedColors(&name, &renderer_prefs.focus_ring_color, 1); 3032 WebKit::setNamedColors(&name, &renderer_prefs.focus_ring_color, 1);
3032 #endif 3033 #endif
3033 } 3034 }
3034 3035
3035 void RenderView::OnMediaPlayerActionAt(int x, 3036 void RenderView::OnMediaPlayerActionAt(const gfx::Point& location,
3036 int y, 3037 const WebMediaPlayerAction& action) {
3037 const MediaPlayerAction& action) { 3038 if (webview())
3038 if (!webview()) 3039 webview()->performMediaPlayerAction(action, location);
3039 return;
3040
3041 webview()->MediaPlayerActionAt(x, y, action);
3042 } 3040 }
3043 3041
3044 void RenderView::OnNotifyRendererViewType(ViewType::Type type) { 3042 void RenderView::OnNotifyRendererViewType(ViewType::Type type) {
3045 // When this is first set, the bindings aren't fully loaded. We only need 3043 // When this is first set, the bindings aren't fully loaded. We only need
3046 // to call through this API after the page has already been loaded. It's 3044 // to call through this API after the page has already been loaded. It's
3047 // also called in didCreateDocumentElement to bootstrap. 3045 // also called in didCreateDocumentElement to bootstrap.
3048 if (view_type_ != ViewType::INVALID) { 3046 if (view_type_ != ViewType::INVALID) {
3049 if (type == ViewType::EXTENSION_MOLE || 3047 if (type == ViewType::EXTENSION_MOLE ||
3050 type == ViewType::EXTENSION_TOOLSTRIP) { 3048 type == ViewType::EXTENSION_TOOLSTRIP) {
3051 ExtensionProcessBindings::SetViewType(webview(), type); 3049 ExtensionProcessBindings::SetViewType(webview(), type);
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
3638 new PluginMsg_SignalModalDialogEvent(host_window_)); 3636 new PluginMsg_SignalModalDialogEvent(host_window_));
3639 3637
3640 message->EnableMessagePumping(); // Runs a nested message loop. 3638 message->EnableMessagePumping(); // Runs a nested message loop.
3641 bool rv = Send(message); 3639 bool rv = Send(message);
3642 3640
3643 PluginChannelHost::Broadcast( 3641 PluginChannelHost::Broadcast(
3644 new PluginMsg_ResetModalDialogEvent(host_window_)); 3642 new PluginMsg_ResetModalDialogEvent(host_window_));
3645 3643
3646 return rv; 3644 return rv;
3647 } 3645 }
OLDNEW
« no previous file with comments | « chrome/renderer/render_view.h ('k') | webkit/api/public/WebMediaPlayerAction.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698