| OLD | NEW |
| 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/browser/renderer_host/resource_message_filter.h" | 5 #include "chrome/browser/renderer_host/resource_message_filter.h" |
| 6 | 6 |
| 7 #include "app/clipboard/clipboard.h" | 7 #include "app/clipboard/clipboard.h" |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #if defined(OS_POSIX) | 10 #if defined(OS_POSIX) |
| (...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_GetScreenInfo, | 358 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_GetScreenInfo, |
| 359 OnGetScreenInfo) | 359 OnGetScreenInfo) |
| 360 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_GetWindowRect, | 360 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_GetWindowRect, |
| 361 OnGetWindowRect) | 361 OnGetWindowRect) |
| 362 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_GetRootWindowRect, | 362 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_GetRootWindowRect, |
| 363 OnGetRootWindowRect) | 363 OnGetRootWindowRect) |
| 364 #endif | 364 #endif |
| 365 | 365 |
| 366 IPC_MESSAGE_HANDLER(ViewHostMsg_CreateWindow, OnMsgCreateWindow) | 366 IPC_MESSAGE_HANDLER(ViewHostMsg_CreateWindow, OnMsgCreateWindow) |
| 367 IPC_MESSAGE_HANDLER(ViewHostMsg_CreateWidget, OnMsgCreateWidget) | 367 IPC_MESSAGE_HANDLER(ViewHostMsg_CreateWidget, OnMsgCreateWidget) |
| 368 IPC_MESSAGE_HANDLER(ViewHostMsg_CreateFullscreenWidget, |
| 369 OnMsgCreateFullscreenWidget) |
| 368 IPC_MESSAGE_HANDLER(ViewHostMsg_SetCookie, OnSetCookie) | 370 IPC_MESSAGE_HANDLER(ViewHostMsg_SetCookie, OnSetCookie) |
| 369 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_GetCookies, OnGetCookies) | 371 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_GetCookies, OnGetCookies) |
| 370 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_GetRawCookies, | 372 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_GetRawCookies, |
| 371 OnGetRawCookies) | 373 OnGetRawCookies) |
| 372 IPC_MESSAGE_HANDLER(ViewHostMsg_DeleteCookie, OnDeleteCookie) | 374 IPC_MESSAGE_HANDLER(ViewHostMsg_DeleteCookie, OnDeleteCookie) |
| 373 #if defined(OS_MACOSX) | 375 #if defined(OS_MACOSX) |
| 374 IPC_MESSAGE_HANDLER(ViewHostMsg_LoadFont, OnLoadFont) | 376 IPC_MESSAGE_HANDLER(ViewHostMsg_LoadFont, OnLoadFont) |
| 375 #endif | 377 #endif |
| 376 #if defined(OS_WIN) // This hack is Windows-specific. | 378 #if defined(OS_WIN) // This hack is Windows-specific. |
| 377 IPC_MESSAGE_HANDLER(ViewHostMsg_PreCacheFont, OnPreCacheFont) | 379 IPC_MESSAGE_HANDLER(ViewHostMsg_PreCacheFont, OnPreCacheFont) |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 557 handle(), | 559 handle(), |
| 558 route_id); | 560 route_id); |
| 559 } | 561 } |
| 560 | 562 |
| 561 void ResourceMessageFilter::OnMsgCreateWidget(int opener_id, | 563 void ResourceMessageFilter::OnMsgCreateWidget(int opener_id, |
| 562 WebKit::WebPopupType popup_type, | 564 WebKit::WebPopupType popup_type, |
| 563 int* route_id) { | 565 int* route_id) { |
| 564 render_widget_helper_->CreateNewWidget(opener_id, popup_type, route_id); | 566 render_widget_helper_->CreateNewWidget(opener_id, popup_type, route_id); |
| 565 } | 567 } |
| 566 | 568 |
| 569 void ResourceMessageFilter::OnMsgCreateFullscreenWidget( |
| 570 int opener_id, WebKit::WebPopupType popup_type, int* route_id) { |
| 571 render_widget_helper_->CreateNewFullscreenWidget( |
| 572 opener_id, popup_type, route_id); |
| 573 } |
| 574 |
| 567 void ResourceMessageFilter::OnSetCookie(const IPC::Message& message, | 575 void ResourceMessageFilter::OnSetCookie(const IPC::Message& message, |
| 568 const GURL& url, | 576 const GURL& url, |
| 569 const GURL& first_party_for_cookies, | 577 const GURL& first_party_for_cookies, |
| 570 const std::string& cookie) { | 578 const std::string& cookie) { |
| 571 ChromeURLRequestContext* context = GetRequestContextForURL(url); | 579 ChromeURLRequestContext* context = GetRequestContextForURL(url); |
| 572 | 580 |
| 573 SetCookieCompletion* callback = | 581 SetCookieCompletion* callback = |
| 574 new SetCookieCompletion(id(), message.routing_id(), url, cookie, | 582 new SetCookieCompletion(id(), message.routing_id(), url, cookie, |
| 575 context); | 583 context); |
| 576 | 584 |
| (...skipping 1093 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1670 | 1678 |
| 1671 ViewHostMsg_GetRawCookies::WriteReplyParams(reply_msg_, cookies); | 1679 ViewHostMsg_GetRawCookies::WriteReplyParams(reply_msg_, cookies); |
| 1672 filter_->Send(reply_msg_); | 1680 filter_->Send(reply_msg_); |
| 1673 delete this; | 1681 delete this; |
| 1674 } | 1682 } |
| 1675 } | 1683 } |
| 1676 | 1684 |
| 1677 void GetCookiesCompletion::set_cookie_store(CookieStore* cookie_store) { | 1685 void GetCookiesCompletion::set_cookie_store(CookieStore* cookie_store) { |
| 1678 cookie_store_ = cookie_store; | 1686 cookie_store_ = cookie_store; |
| 1679 } | 1687 } |
| OLD | NEW |