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

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

Issue 7038028: Initial support for cloudprint in print preview (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix bad merge Created 9 years, 7 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_thread.h" 5 #include "content/renderer/render_thread.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 #include "net/base/net_errors.h" 49 #include "net/base/net_errors.h"
50 #include "net/base/net_util.h" 50 #include "net/base/net_util.h"
51 #include "third_party/tcmalloc/chromium/src/google/malloc_extension.h" 51 #include "third_party/tcmalloc/chromium/src/google/malloc_extension.h"
52 #include "third_party/WebKit/Source/WebKit/chromium/public/WebColor.h" 52 #include "third_party/WebKit/Source/WebKit/chromium/public/WebColor.h"
53 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDatabase.h" 53 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDatabase.h"
54 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" 54 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h"
55 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" 55 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
56 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" 56 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h"
57 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRuntimeFeatures.h" 57 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRuntimeFeatures.h"
58 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptController.h " 58 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptController.h "
59 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h"
59 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageEventDispat cher.h" 60 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageEventDispat cher.h"
60 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" 61 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
62 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLRequest.h"
61 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" 63 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
62 #include "v8/include/v8.h" 64 #include "v8/include/v8.h"
63 #include "webkit/extensions/v8/benchmarking_extension.h" 65 #include "webkit/extensions/v8/benchmarking_extension.h"
64 #include "webkit/extensions/v8/playback_extension.h" 66 #include "webkit/extensions/v8/playback_extension.h"
65 #include "webkit/glue/webkit_glue.h" 67 #include "webkit/glue/webkit_glue.h"
66 68
67 // TODO(port) 69 // TODO(port)
68 #if defined(OS_WIN) 70 #if defined(OS_WIN)
69 #include "content/plugin/plugin_channel.h" 71 #include "content/plugin/plugin_channel.h"
70 #else 72 #else
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 this, 431 this,
430 params.parent_window, 432 params.parent_window,
431 params.compositing_surface, 433 params.compositing_surface,
432 MSG_ROUTING_NONE, 434 MSG_ROUTING_NONE,
433 params.renderer_preferences, 435 params.renderer_preferences,
434 params.web_preferences, 436 params.web_preferences,
435 new SharedRenderViewCounter(0), 437 new SharedRenderViewCounter(0),
436 params.view_id, 438 params.view_id,
437 params.session_storage_namespace_id, 439 params.session_storage_namespace_id,
438 params.frame_name); 440 params.frame_name);
441
442 WebKit::WebSecurityPolicy::addOriginAccessWhitelistEntry(
Scott Byer 2011/05/24 23:40:32 This is going to need to be fixed up (sorry, it wa
443 GURL("chrome://print"),
444 WebKit::WebString::fromUTF8("https"),
445 WebKit::WebString::fromUTF8("www.google.com"),
446 true);
439 } 447 }
440 448
441 void RenderThread::CloseCurrentConnections() { 449 void RenderThread::CloseCurrentConnections() {
442 Send(new ViewHostMsg_CloseCurrentConnections()); 450 Send(new ViewHostMsg_CloseCurrentConnections());
443 } 451 }
444 452
445 void RenderThread::SetCacheMode(bool enabled) { 453 void RenderThread::SetCacheMode(bool enabled) {
446 Send(new ViewHostMsg_SetCacheMode(enabled)); 454 Send(new ViewHostMsg_SetCacheMode(enabled));
447 } 455 }
448 456
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
676 684
677 void RenderThread::RegisterExtension(v8::Extension* extension) { 685 void RenderThread::RegisterExtension(v8::Extension* extension) {
678 WebScriptController::registerExtension(extension); 686 WebScriptController::registerExtension(extension);
679 v8_extensions_.insert(extension->name()); 687 v8_extensions_.insert(extension->name());
680 } 688 }
681 689
682 bool RenderThread::IsRegisteredExtension( 690 bool RenderThread::IsRegisteredExtension(
683 const std::string& v8_extension_name) const { 691 const std::string& v8_extension_name) const {
684 return v8_extensions_.find(v8_extension_name) != v8_extensions_.end(); 692 return v8_extensions_.find(v8_extension_name) != v8_extensions_.end();
685 } 693 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698