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

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

Issue 7764014: Remove handling for the ViewHostMsg_GetCookies and ViewHostMsg_SetCookies from Chrome. These mess... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 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 "chrome/renderer/chrome_content_renderer_client.h" 5 #include "chrome/renderer/chrome_content_renderer_client.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 #include "chrome/renderer/spellchecker/spellcheck_provider.h" 59 #include "chrome/renderer/spellchecker/spellcheck_provider.h"
60 #include "chrome/renderer/text_input_client_observer.h" 60 #include "chrome/renderer/text_input_client_observer.h"
61 #include "chrome/renderer/translate_helper.h" 61 #include "chrome/renderer/translate_helper.h"
62 #include "chrome/renderer/visitedlink_slave.h" 62 #include "chrome/renderer/visitedlink_slave.h"
63 #include "content/common/view_messages.h" 63 #include "content/common/view_messages.h"
64 #include "content/renderer/render_thread.h" 64 #include "content/renderer/render_thread.h"
65 #include "content/renderer/render_view.h" 65 #include "content/renderer/render_view.h"
66 #include "grit/generated_resources.h" 66 #include "grit/generated_resources.h"
67 #include "grit/locale_settings.h" 67 #include "grit/locale_settings.h"
68 #include "grit/renderer_resources.h" 68 #include "grit/renderer_resources.h"
69 #include "ipc/ipc_sync_message.h"
69 #include "net/base/net_errors.h" 70 #include "net/base/net_errors.h"
70 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCache.h" 71 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCache.h"
71 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDataSource.h" 72 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDataSource.h"
72 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" 73 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h"
73 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" 74 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
74 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginParams.h" 75 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginParams.h"
75 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h" 76 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h"
76 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h" 77 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h"
77 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h" 78 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h"
78 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLError.h" 79 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLError.h"
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after
677 bool ChromeContentRendererClient::ShouldOverridePageVisibilityState( 678 bool ChromeContentRendererClient::ShouldOverridePageVisibilityState(
678 const RenderView* render_view, 679 const RenderView* render_view,
679 WebKit::WebPageVisibilityState* override_state) const { 680 WebKit::WebPageVisibilityState* override_state) const {
680 if (!prerender::PrerenderHelper::IsPrerendering(render_view)) 681 if (!prerender::PrerenderHelper::IsPrerendering(render_view))
681 return false; 682 return false;
682 683
683 *override_state = WebKit::WebPageVisibilityStatePrerender; 684 *override_state = WebKit::WebPageVisibilityStatePrerender;
684 return true; 685 return true;
685 } 686 }
686 687
688 bool ChromeContentRendererClient::HandleGetCookieRequest(
689 RenderView* sender,
690 const GURL& url,
691 const GURL& first_party_for_cookies,
692 std::string* cookies) {
693 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kChromeFrame)) {
694 IPC::SyncMessage* msg = new ChromeViewHostMsg_GetCookies(
695 MSG_ROUTING_NONE, url, first_party_for_cookies, cookies);
696 msg->EnableMessagePumping();
697 sender->Send(msg);
698 return true;
699 }
700 return false;
701 }
702
703 bool ChromeContentRendererClient::HandleSetCookieRequest(
704 RenderView* sender,
705 const GURL& url,
706 const GURL& first_party_for_cookies,
707 const std::string& value) {
708 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kChromeFrame)) {
709 sender->Send(new ChromeViewHostMsg_SetCookie(
710 MSG_ROUTING_NONE, url, first_party_for_cookies, value));
711 return true;
712 }
713 return false;
714 }
715
716
687 void ChromeContentRendererClient::SetExtensionDispatcher( 717 void ChromeContentRendererClient::SetExtensionDispatcher(
688 ExtensionDispatcher* extension_dispatcher) { 718 ExtensionDispatcher* extension_dispatcher) {
689 extension_dispatcher_.reset(extension_dispatcher); 719 extension_dispatcher_.reset(extension_dispatcher);
690 } 720 }
691 721
692 bool ChromeContentRendererClient::CrossesExtensionExtents( 722 bool ChromeContentRendererClient::CrossesExtensionExtents(
693 WebFrame* frame, 723 WebFrame* frame,
694 const GURL& new_url, 724 const GURL& new_url,
695 bool is_initial_navigation) { 725 bool is_initial_navigation) {
696 const ExtensionSet* extensions = extension_dispatcher_->extensions(); 726 const ExtensionSet* extensions = extension_dispatcher_->extensions();
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
736 if (spellcheck_.get()) 766 if (spellcheck_.get())
737 thread->RemoveObserver(spellcheck_.get()); 767 thread->RemoveObserver(spellcheck_.get());
738 SpellCheck* new_spellcheck = new SpellCheck(); 768 SpellCheck* new_spellcheck = new SpellCheck();
739 if (spellcheck_provider_) 769 if (spellcheck_provider_)
740 spellcheck_provider_->SetSpellCheck(new_spellcheck); 770 spellcheck_provider_->SetSpellCheck(new_spellcheck);
741 spellcheck_.reset(new_spellcheck); 771 spellcheck_.reset(new_spellcheck);
742 thread->AddObserver(new_spellcheck); 772 thread->AddObserver(new_spellcheck);
743 } 773 }
744 774
745 } // namespace chrome 775 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/renderer/chrome_content_renderer_client.h ('k') | content/renderer/content_renderer_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698