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

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

Issue 155954: Implement sending actions back to the render for media element context menus. (Closed)
Patch Set: remove uneeded bits. Created 11 years, 5 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 | « chrome/renderer/render_view.h ('k') | webkit/glue/context_menu.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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 #include "grit/renderer_resources.h" 52 #include "grit/renderer_resources.h"
53 #include "net/base/data_url.h" 53 #include "net/base/data_url.h"
54 #include "net/base/escape.h" 54 #include "net/base/escape.h"
55 #include "net/base/net_errors.h" 55 #include "net/base/net_errors.h"
56 #include "skia/ext/bitmap_platform_device.h" 56 #include "skia/ext/bitmap_platform_device.h"
57 #include "skia/ext/image_operations.h" 57 #include "skia/ext/image_operations.h"
58 #include "webkit/api/public/WebDataSource.h" 58 #include "webkit/api/public/WebDataSource.h"
59 #include "webkit/api/public/WebDragData.h" 59 #include "webkit/api/public/WebDragData.h"
60 #include "webkit/api/public/WebForm.h" 60 #include "webkit/api/public/WebForm.h"
61 #include "webkit/api/public/WebHistoryItem.h" 61 #include "webkit/api/public/WebHistoryItem.h"
62 #include "webkit/api/public/WebNode.h"
62 #include "webkit/api/public/WebPoint.h" 63 #include "webkit/api/public/WebPoint.h"
63 #include "webkit/api/public/WebRect.h" 64 #include "webkit/api/public/WebRect.h"
64 #include "webkit/api/public/WebScriptSource.h" 65 #include "webkit/api/public/WebScriptSource.h"
65 #include "webkit/api/public/WebSize.h" 66 #include "webkit/api/public/WebSize.h"
66 #include "webkit/api/public/WebURL.h" 67 #include "webkit/api/public/WebURL.h"
67 #include "webkit/api/public/WebURLError.h" 68 #include "webkit/api/public/WebURLError.h"
68 #include "webkit/api/public/WebURLRequest.h" 69 #include "webkit/api/public/WebURLRequest.h"
69 #include "webkit/api/public/WebURLResponse.h" 70 #include "webkit/api/public/WebURLResponse.h"
70 #include "webkit/api/public/WebVector.h" 71 #include "webkit/api/public/WebVector.h"
71 #include "webkit/default_plugin/default_plugin_shared.h" 72 #include "webkit/default_plugin/default_plugin_shared.h"
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 OnReceivedAutofillSuggestions) 414 OnReceivedAutofillSuggestions)
414 IPC_MESSAGE_HANDLER(ViewMsg_PopupNotificationVisibilityChanged, 415 IPC_MESSAGE_HANDLER(ViewMsg_PopupNotificationVisibilityChanged,
415 OnPopupNotificationVisibilityChanged) 416 OnPopupNotificationVisibilityChanged)
416 IPC_MESSAGE_HANDLER(ViewMsg_MoveOrResizeStarted, OnMoveOrResizeStarted) 417 IPC_MESSAGE_HANDLER(ViewMsg_MoveOrResizeStarted, OnMoveOrResizeStarted)
417 IPC_MESSAGE_HANDLER(ViewMsg_ExtensionResponse, OnExtensionResponse) 418 IPC_MESSAGE_HANDLER(ViewMsg_ExtensionResponse, OnExtensionResponse)
418 IPC_MESSAGE_HANDLER(ViewMsg_ClearFocusedNode, OnClearFocusedNode) 419 IPC_MESSAGE_HANDLER(ViewMsg_ClearFocusedNode, OnClearFocusedNode)
419 IPC_MESSAGE_HANDLER(ViewMsg_SetBackground, OnSetBackground) 420 IPC_MESSAGE_HANDLER(ViewMsg_SetBackground, OnSetBackground)
420 IPC_MESSAGE_HANDLER(ViewMsg_EnableIntrinsicWidthChangedMode, 421 IPC_MESSAGE_HANDLER(ViewMsg_EnableIntrinsicWidthChangedMode,
421 OnEnableIntrinsicWidthChangedMode) 422 OnEnableIntrinsicWidthChangedMode)
422 IPC_MESSAGE_HANDLER(ViewMsg_SetRendererPrefs, OnSetRendererPrefs) 423 IPC_MESSAGE_HANDLER(ViewMsg_SetRendererPrefs, OnSetRendererPrefs)
424 IPC_MESSAGE_HANDLER(ViewMsg_MediaPlayerActionAt, OnMediaPlayerActionAt)
423 425
424 // Have the super handle all other messages. 426 // Have the super handle all other messages.
425 IPC_MESSAGE_UNHANDLED(RenderWidget::OnMessageReceived(message)) 427 IPC_MESSAGE_UNHANDLED(RenderWidget::OnMessageReceived(message))
426 IPC_END_MESSAGE_MAP() 428 IPC_END_MESSAGE_MAP()
427 } 429 }
428 430
429 void RenderView::SendThumbnail() { 431 void RenderView::SendThumbnail() {
430 WebFrame* main_frame = webview()->GetMainFrame(); 432 WebFrame* main_frame = webview()->GetMainFrame();
431 if (!main_frame) 433 if (!main_frame)
432 return; 434 return;
(...skipping 1533 matching lines...) Expand 10 before | Expand all | Expand 10 after
1966 const WebHistoryItem& item = 1968 const WebHistoryItem& item =
1967 webview()->GetMainFrame()->GetCurrentHistoryItem(); 1969 webview()->GetMainFrame()->GetCurrentHistoryItem();
1968 if (item.isNull()) 1970 if (item.isNull())
1969 return; 1971 return;
1970 1972
1971 Send(new ViewHostMsg_UpdateState( 1973 Send(new ViewHostMsg_UpdateState(
1972 routing_id_, page_id_, webkit_glue::HistoryItemToString(item))); 1974 routing_id_, page_id_, webkit_glue::HistoryItemToString(item)));
1973 } 1975 }
1974 1976
1975 void RenderView::ShowContextMenu(WebView* webview, 1977 void RenderView::ShowContextMenu(WebView* webview,
1976 ContextNode node, 1978 ContextNodeType node_type,
1977 int x, 1979 int x,
1978 int y, 1980 int y,
1979 const GURL& link_url, 1981 const GURL& link_url,
1980 const GURL& src_url, 1982 const GURL& src_url,
1981 const GURL& page_url, 1983 const GURL& page_url,
1982 const GURL& frame_url, 1984 const GURL& frame_url,
1983 const ContextMenuMediaParams& media_params, 1985 const ContextMenuMediaParams& media_params,
1984 const std::wstring& selection_text, 1986 const std::wstring& selection_text,
1985 const std::wstring& misspelled_word, 1987 const std::wstring& misspelled_word,
1986 int edit_flags, 1988 int edit_flags,
1987 const std::string& security_info, 1989 const std::string& security_info,
1988 const std::string& frame_charset) { 1990 const std::string& frame_charset) {
1989 ContextMenuParams params; 1991 ContextMenuParams params;
1990 params.node = node; 1992 params.node_type = node_type;
1991 params.x = x; 1993 params.x = x;
1992 params.y = y; 1994 params.y = y;
1993 params.src_url = src_url; 1995 params.src_url = src_url;
1994 params.link_url = link_url; 1996 params.link_url = link_url;
1995 params.unfiltered_link_url = link_url; 1997 params.unfiltered_link_url = link_url;
1996 params.page_url = page_url; 1998 params.page_url = page_url;
1997 params.frame_url = frame_url; 1999 params.frame_url = frame_url;
1998 params.media_params = media_params; 2000 params.media_params = media_params;
1999 params.selection_text = selection_text; 2001 params.selection_text = selection_text;
2000 params.misspelled_word = misspelled_word; 2002 params.misspelled_word = misspelled_word;
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after
2621 } 2623 }
2622 2624
2623 void RenderView::OnEnableIntrinsicWidthChangedMode() { 2625 void RenderView::OnEnableIntrinsicWidthChangedMode() {
2624 send_preferred_width_changes_ = true; 2626 send_preferred_width_changes_ = true;
2625 } 2627 }
2626 2628
2627 void RenderView::OnSetRendererPrefs(const RendererPreferences& renderer_prefs) { 2629 void RenderView::OnSetRendererPrefs(const RendererPreferences& renderer_prefs) {
2628 renderer_preferences_ = renderer_prefs; 2630 renderer_preferences_ = renderer_prefs;
2629 } 2631 }
2630 2632
2633 void RenderView::OnMediaPlayerActionAt(int x,
2634 int y,
2635 const MediaPlayerAction& action) {
2636 if (!webview())
2637 return;
2638
2639 webview()->MediaPlayerActionAt(x, y, action);
2640 }
2641
2631 void RenderView::OnUpdateBackForwardListCount(int back_list_count, 2642 void RenderView::OnUpdateBackForwardListCount(int back_list_count,
2632 int forward_list_count) { 2643 int forward_list_count) {
2633 history_back_list_count_ = back_list_count; 2644 history_back_list_count_ = back_list_count;
2634 history_forward_list_count_ = forward_list_count; 2645 history_forward_list_count_ = forward_list_count;
2635 } 2646 }
2636 2647
2637 void RenderView::OnGetAccessibilityInfo( 2648 void RenderView::OnGetAccessibilityInfo(
2638 const webkit_glue::WebAccessibility::InParams& in_params, 2649 const webkit_glue::WebAccessibility::InParams& in_params,
2639 webkit_glue::WebAccessibility::OutParams* out_params) { 2650 webkit_glue::WebAccessibility::OutParams* out_params) {
2640 #if defined(OS_WIN) 2651 #if defined(OS_WIN)
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
3060 Send(new ViewHostMsg_PasswordFormsSeen(routing_id_, password_forms)); 3071 Send(new ViewHostMsg_PasswordFormsSeen(routing_id_, password_forms));
3061 } 3072 }
3062 3073
3063 void RenderView::Print(WebFrame* frame, bool script_initiated) { 3074 void RenderView::Print(WebFrame* frame, bool script_initiated) {
3064 DCHECK(frame); 3075 DCHECK(frame);
3065 if (print_helper_.get() == NULL) { 3076 if (print_helper_.get() == NULL) {
3066 print_helper_.reset(new PrintWebViewHelper(this)); 3077 print_helper_.reset(new PrintWebViewHelper(this));
3067 } 3078 }
3068 print_helper_->Print(frame, script_initiated); 3079 print_helper_->Print(frame, script_initiated);
3069 } 3080 }
OLDNEW
« no previous file with comments | « chrome/renderer/render_view.h ('k') | webkit/glue/context_menu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698