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

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

Issue 5238002: Reintegrate 552 r66225-r66645.... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/552d/src/
Patch Set: '' Created 10 years, 1 month 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/common/chrome_switches.cc ('k') | third_party/libxml/README.chromium » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 <cmath> 8 #include <cmath>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 2638 matching lines...) Expand 10 before | Expand all | Expand 10 after
2649 return true; 2649 return true;
2650 2650
2651 if (IsWhitelistedForContentSettings(frame)) 2651 if (IsWhitelistedForContentSettings(frame))
2652 return true; 2652 return true;
2653 2653
2654 DidBlockContentType(CONTENT_SETTINGS_TYPE_IMAGES, std::string()); 2654 DidBlockContentType(CONTENT_SETTINGS_TYPE_IMAGES, std::string());
2655 return false; // Other protocols fall through here. 2655 return false; // Other protocols fall through here.
2656 } 2656 }
2657 2657
2658 bool RenderView::allowPlugins(WebFrame* frame, bool enabled_per_settings) { 2658 bool RenderView::allowPlugins(WebFrame* frame, bool enabled_per_settings) {
2659 if (!CommandLine::ForCurrentProcess()->HasSwitch( 2659 return WebFrameClient::allowPlugins(frame, enabled_per_settings);
2660 switches::kDisableClickToPlay)) {
2661 return WebFrameClient::allowPlugins(frame, enabled_per_settings);
2662 }
2663 return enabled_per_settings &&
2664 AllowContentType(CONTENT_SETTINGS_TYPE_PLUGINS);
2665 } 2660 }
2666 2661
2667 2662
2668 void RenderView::loadURLExternally( 2663 void RenderView::loadURLExternally(
2669 WebFrame* frame, const WebURLRequest& request, 2664 WebFrame* frame, const WebURLRequest& request,
2670 WebNavigationPolicy policy) { 2665 WebNavigationPolicy policy) {
2671 GURL referrer(request.httpHeaderField(WebString::fromUTF8("Referer"))); 2666 GURL referrer(request.httpHeaderField(WebString::fromUTF8("Referer")));
2672 if (policy == WebKit::WebNavigationPolicyDownload) { 2667 if (policy == WebKit::WebNavigationPolicyDownload) {
2673 Send(new ViewHostMsg_DownloadUrl(routing_id_, request.url(), referrer)); 2668 Send(new ViewHostMsg_DownloadUrl(routing_id_, request.url(), referrer));
2674 } else { 2669 } else {
(...skipping 3359 matching lines...) Expand 10 before | Expand all | Expand 10 after
6034 } 6029 }
6035 6030
6036 void RenderView::OnAsyncFileOpened(base::PlatformFileError error_code, 6031 void RenderView::OnAsyncFileOpened(base::PlatformFileError error_code,
6037 IPC::PlatformFileForTransit file_for_transit, 6032 IPC::PlatformFileForTransit file_for_transit,
6038 int message_id) { 6033 int message_id) {
6039 pepper_delegate_.OnAsyncFileOpened( 6034 pepper_delegate_.OnAsyncFileOpened(
6040 error_code, 6035 error_code,
6041 IPC::PlatformFileForTransitToPlatformFile(file_for_transit), 6036 IPC::PlatformFileForTransitToPlatformFile(file_for_transit),
6042 message_id); 6037 message_id);
6043 } 6038 }
OLDNEW
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | third_party/libxml/README.chromium » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698