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

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

Issue 6480106: Add IPCs to check web copy/cut/paste for extensions with the appropriate permission bit. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome
Patch Set: Move RenderView methods to match WebViewClient header. Created 9 years, 8 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "content/renderer/render_view.h" 5 #include "content/renderer/render_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 1447 matching lines...) Expand 10 before | Expand all | Expand 10 after
1458 1458
1459 void RenderView::didExecuteCommand(const WebString& command_name) { 1459 void RenderView::didExecuteCommand(const WebString& command_name) {
1460 const std::string& name = UTF16ToUTF8(command_name); 1460 const std::string& name = UTF16ToUTF8(command_name);
1461 if (StartsWithASCII(name, "Move", true) || 1461 if (StartsWithASCII(name, "Move", true) ||
1462 StartsWithASCII(name, "Insert", true) || 1462 StartsWithASCII(name, "Insert", true) ||
1463 StartsWithASCII(name, "Delete", true)) 1463 StartsWithASCII(name, "Delete", true))
1464 return; 1464 return;
1465 webkit_glue::UserMetricsRecordAction(name); 1465 webkit_glue::UserMetricsRecordAction(name);
1466 } 1466 }
1467 1467
1468 bool RenderView::canTriggerClipboardRead(const WebURL& url) {
1469 bool allowed;
jam 2011/04/27 00:54:12 nit should initialize this to false in case IPC fa
1470 RenderThread::current()->Send(
jam 2011/04/27 00:54:12 RenderView can send IPCs directly, no need for "Re
1471 new ViewHostMsg_CanTriggerClipboardRead(routing_id_, GURL(url),
1472 &allowed));
1473 return allowed;
1474 }
1475
1476 bool RenderView::canTriggerClipboardWrite(const WebURL& url) {
1477 bool allowed;
1478 RenderThread::current()->Send(
1479 new ViewHostMsg_CanTriggerClipboardWrite(routing_id_, GURL(url),
1480 &allowed));
1481 return allowed;
1482 }
1483
1468 void RenderView::SendPendingAccessibilityNotifications() { 1484 void RenderView::SendPendingAccessibilityNotifications() {
1469 if (!accessibility_.get()) 1485 if (!accessibility_.get())
1470 return; 1486 return;
1471 1487
1472 if (pending_accessibility_notifications_.empty()) 1488 if (pending_accessibility_notifications_.empty())
1473 return; 1489 return;
1474 1490
1475 // Send all pending accessibility notifications. 1491 // Send all pending accessibility notifications.
1476 std::vector<ViewHostMsg_AccessibilityNotification_Params> notifications; 1492 std::vector<ViewHostMsg_AccessibilityNotification_Params> notifications;
1477 for (size_t i = 0; i < pending_accessibility_notifications_.size(); i++) { 1493 for (size_t i = 0; i < pending_accessibility_notifications_.size(); i++) {
(...skipping 2747 matching lines...) Expand 10 before | Expand all | Expand 10 after
4225 const webkit_glue::CustomContextMenuContext& custom_context) { 4241 const webkit_glue::CustomContextMenuContext& custom_context) {
4226 if (custom_context.is_pepper_menu) 4242 if (custom_context.is_pepper_menu)
4227 pepper_delegate_.OnContextMenuClosed(custom_context); 4243 pepper_delegate_.OnContextMenuClosed(custom_context);
4228 else 4244 else
4229 context_menu_node_.reset(); 4245 context_menu_node_.reset();
4230 } 4246 }
4231 4247
4232 void RenderView::OnNetworkStateChanged(bool online) { 4248 void RenderView::OnNetworkStateChanged(bool online) {
4233 WebNetworkStateNotifier::setOnLine(online); 4249 WebNetworkStateNotifier::setOnLine(online);
4234 } 4250 }
OLDNEW
« content/browser/renderer_host/render_message_filter.h ('K') | « content/renderer/render_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698