| 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 1537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1548 | 1548 |
| 1549 void RenderViewHost::SendExtensionResponse(int request_id, bool success, | 1549 void RenderViewHost::SendExtensionResponse(int request_id, bool success, |
| 1550 const std::string& response, | 1550 const std::string& response, |
| 1551 const std::string& error) { | 1551 const std::string& error) { |
| 1552 Send(new ViewMsg_ExtensionResponse(routing_id(), request_id, success, | 1552 Send(new ViewMsg_ExtensionResponse(routing_id(), request_id, success, |
| 1553 response, error)); | 1553 response, error)); |
| 1554 } | 1554 } |
| 1555 | 1555 |
| 1556 void RenderViewHost::OnExtensionPostMessage( | 1556 void RenderViewHost::OnExtensionPostMessage( |
| 1557 int port_id, const std::string& message) { | 1557 int port_id, const std::string& message) { |
| 1558 URLRequestContext* context = process()->profile()->GetRequestContext(); | 1558 if (process()->profile()->GetExtensionMessageService()) { |
| 1559 ExtensionMessageService::GetInstance(context)-> | 1559 process()->profile()->GetExtensionMessageService()-> |
| 1560 PostMessageFromRenderer(port_id, message); | 1560 PostMessageFromRenderer(port_id, message); |
| 1561 } |
| 1561 } | 1562 } |
| 1562 | 1563 |
| 1563 void RenderViewHost::OnAccessibilityFocusChange(int acc_obj_id) { | 1564 void RenderViewHost::OnAccessibilityFocusChange(int acc_obj_id) { |
| 1564 #if defined(OS_WIN) | 1565 #if defined(OS_WIN) |
| 1565 BrowserAccessibilityManager::GetInstance()-> | 1566 BrowserAccessibilityManager::GetInstance()-> |
| 1566 ChangeAccessibilityFocus(acc_obj_id, process()->pid(), routing_id()); | 1567 ChangeAccessibilityFocus(acc_obj_id, process()->pid(), routing_id()); |
| 1567 #else | 1568 #else |
| 1568 // TODO(port): accessibility not yet implemented. See http://crbug.com/8288. | 1569 // TODO(port): accessibility not yet implemented. See http://crbug.com/8288. |
| 1569 #endif | 1570 #endif |
| 1570 } | 1571 } |
| 1571 | 1572 |
| 1572 void RenderViewHost::OnCSSInserted() { | 1573 void RenderViewHost::OnCSSInserted() { |
| 1573 delegate_->DidInsertCSS(); | 1574 delegate_->DidInsertCSS(); |
| 1574 } | 1575 } |
| 1575 | 1576 |
| 1576 void RenderViewHost::SignalModalDialogEvent() { | 1577 void RenderViewHost::SignalModalDialogEvent() { |
| 1577 if (modal_dialog_count_++ == 0) | 1578 if (modal_dialog_count_++ == 0) |
| 1578 modal_dialog_event_->Signal(); | 1579 modal_dialog_event_->Signal(); |
| 1579 } | 1580 } |
| 1580 | 1581 |
| 1581 void RenderViewHost::ResetModalDialogEvent() { | 1582 void RenderViewHost::ResetModalDialogEvent() { |
| 1582 if (--modal_dialog_count_ == 0) | 1583 if (--modal_dialog_count_ == 0) |
| 1583 modal_dialog_event_->Reset(); | 1584 modal_dialog_event_->Reset(); |
| 1584 } | 1585 } |
| OLD | NEW |