OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/render_view_host.h" | 5 #include "chrome/browser/renderer_host/render_view_host.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
664 } | 664 } |
665 | 665 |
666 bool RenderViewHost::SuddenTerminationAllowed() const { | 666 bool RenderViewHost::SuddenTerminationAllowed() const { |
667 return sudden_termination_allowed_ || process()->sudden_termination_allowed(); | 667 return sudden_termination_allowed_ || process()->sudden_termination_allowed(); |
668 } | 668 } |
669 | 669 |
670 /////////////////////////////////////////////////////////////////////////////// | 670 /////////////////////////////////////////////////////////////////////////////// |
671 // RenderViewHost, IPC message handlers: | 671 // RenderViewHost, IPC message handlers: |
672 | 672 |
673 void RenderViewHost::OnMessageReceived(const IPC::Message& msg) { | 673 void RenderViewHost::OnMessageReceived(const IPC::Message& msg) { |
| 674 #if defined(OS_WIN) |
674 if (msg.is_sync() && !msg.is_caller_pumping_messages()) { | 675 if (msg.is_sync() && !msg.is_caller_pumping_messages()) { |
675 NOTREACHED() << "Can't send sync messages to UI thread without pumping " | 676 NOTREACHED() << "Can't send sync messages to UI thread without pumping " |
676 "messages in the renderer or else deadlocks can occur if the page " | 677 "messages in the renderer or else deadlocks can occur if the page " |
677 "has windowed plugins! (message type " << msg.type() << ")"; | 678 "has windowed plugins! (message type " << msg.type() << ")"; |
678 IPC::Message* reply = IPC::SyncMessage::GenerateReply(&msg); | 679 IPC::Message* reply = IPC::SyncMessage::GenerateReply(&msg); |
679 reply->set_reply_error(); | 680 reply->set_reply_error(); |
680 Send(reply); | 681 Send(reply); |
681 return; | 682 return; |
682 } | 683 } |
| 684 #endif |
683 | 685 |
684 bool msg_is_ok = true; | 686 bool msg_is_ok = true; |
685 IPC_BEGIN_MESSAGE_MAP_EX(RenderViewHost, msg, msg_is_ok) | 687 IPC_BEGIN_MESSAGE_MAP_EX(RenderViewHost, msg, msg_is_ok) |
686 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowView, OnMsgShowView) | 688 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowView, OnMsgShowView) |
687 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowWidget, OnMsgShowWidget) | 689 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowWidget, OnMsgShowWidget) |
688 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_RunModal, OnMsgRunModal) | 690 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_RunModal, OnMsgRunModal) |
689 IPC_MESSAGE_HANDLER(ViewHostMsg_RenderViewReady, OnMsgRenderViewReady) | 691 IPC_MESSAGE_HANDLER(ViewHostMsg_RenderViewReady, OnMsgRenderViewReady) |
690 IPC_MESSAGE_HANDLER(ViewHostMsg_RenderViewGone, OnMsgRenderViewGone) | 692 IPC_MESSAGE_HANDLER(ViewHostMsg_RenderViewGone, OnMsgRenderViewGone) |
691 IPC_MESSAGE_HANDLER_GENERIC(ViewHostMsg_FrameNavigate, OnMsgNavigate(msg)) | 693 IPC_MESSAGE_HANDLER_GENERIC(ViewHostMsg_FrameNavigate, OnMsgNavigate(msg)) |
692 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateState, OnMsgUpdateState) | 694 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateState, OnMsgUpdateState) |
(...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1434 BrowserAccessibilityManager::GetInstance()-> | 1436 BrowserAccessibilityManager::GetInstance()-> |
1435 ChangeAccessibilityFocus(acc_obj_id, process()->pid(), routing_id()); | 1437 ChangeAccessibilityFocus(acc_obj_id, process()->pid(), routing_id()); |
1436 #else | 1438 #else |
1437 // TODO(port): accessibility not yet implemented. See http://crbug.com/8288. | 1439 // TODO(port): accessibility not yet implemented. See http://crbug.com/8288. |
1438 #endif | 1440 #endif |
1439 } | 1441 } |
1440 | 1442 |
1441 void RenderViewHost::OnCSSInserted() { | 1443 void RenderViewHost::OnCSSInserted() { |
1442 delegate_->DidInsertCSS(); | 1444 delegate_->DidInsertCSS(); |
1443 } | 1445 } |
OLD | NEW |