| 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 <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 1459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1470 const std::string& feature, | 1470 const std::string& feature, |
| 1471 bool enabled) { | 1471 bool enabled) { |
| 1472 DevToolsManager::GetInstance()-> | 1472 DevToolsManager::GetInstance()-> |
| 1473 RuntimeFeatureStateChanged(this, feature, enabled); | 1473 RuntimeFeatureStateChanged(this, feature, enabled); |
| 1474 } | 1474 } |
| 1475 | 1475 |
| 1476 void RenderViewHost::OnUserMetricsRecordAction(const std::string& action) { | 1476 void RenderViewHost::OnUserMetricsRecordAction(const std::string& action) { |
| 1477 UserMetrics::RecordComputedAction(action.c_str(), process()->profile()); | 1477 UserMetrics::RecordComputedAction(action.c_str(), process()->profile()); |
| 1478 } | 1478 } |
| 1479 | 1479 |
| 1480 bool RenderViewHost::ShouldSendToRenderer(const NativeWebKeyboardEvent& event) { | 1480 bool RenderViewHost::PreHandleKeyboardEvent( |
| 1481 const NativeWebKeyboardEvent& event, bool* is_keyboard_shortcut) { |
| 1481 RenderViewHostDelegate::View* view = delegate_->GetViewDelegate(); | 1482 RenderViewHostDelegate::View* view = delegate_->GetViewDelegate(); |
| 1482 if (!view) | 1483 return view && view->PreHandleKeyboardEvent(event, is_keyboard_shortcut); |
| 1483 return true; | |
| 1484 return !view->IsReservedAccelerator(event); | |
| 1485 } | 1484 } |
| 1486 | 1485 |
| 1487 bool RenderViewHost::UnhandledKeyboardEvent( | 1486 void RenderViewHost::UnhandledKeyboardEvent( |
| 1488 const NativeWebKeyboardEvent& event) { | 1487 const NativeWebKeyboardEvent& event) { |
| 1489 RenderViewHostDelegate::View* view = delegate_->GetViewDelegate(); | 1488 RenderViewHostDelegate::View* view = delegate_->GetViewDelegate(); |
| 1490 if (view) { | 1489 if (view) |
| 1491 return view->HandleKeyboardEvent(event); | 1490 view->HandleKeyboardEvent(event); |
| 1492 } | |
| 1493 return false; | |
| 1494 } | 1491 } |
| 1495 | 1492 |
| 1496 void RenderViewHost::OnUserGesture() { | 1493 void RenderViewHost::OnUserGesture() { |
| 1497 RenderViewHostDelegate::BrowserIntegration* integration_delegate = | 1494 RenderViewHostDelegate::BrowserIntegration* integration_delegate = |
| 1498 delegate_->GetBrowserIntegrationDelegate(); | 1495 delegate_->GetBrowserIntegrationDelegate(); |
| 1499 if (integration_delegate) | 1496 if (integration_delegate) |
| 1500 integration_delegate->OnUserGesture(); | 1497 integration_delegate->OnUserGesture(); |
| 1501 } | 1498 } |
| 1502 | 1499 |
| 1503 void RenderViewHost::OnMissingPluginStatus(int status) { | 1500 void RenderViewHost::OnMissingPluginStatus(int status) { |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1778 BrowserAccessibilityManager::GetInstance()->ChangeAccessibilityFocus( | 1775 BrowserAccessibilityManager::GetInstance()->ChangeAccessibilityFocus( |
| 1779 acc_obj_id, process()->id(), routing_id()); | 1776 acc_obj_id, process()->id(), routing_id()); |
| 1780 #else | 1777 #else |
| 1781 // TODO(port): accessibility not yet implemented. See http://crbug.com/8288. | 1778 // TODO(port): accessibility not yet implemented. See http://crbug.com/8288. |
| 1782 #endif | 1779 #endif |
| 1783 } | 1780 } |
| 1784 | 1781 |
| 1785 void RenderViewHost::OnCSSInserted() { | 1782 void RenderViewHost::OnCSSInserted() { |
| 1786 delegate_->DidInsertCSS(); | 1783 delegate_->DidInsertCSS(); |
| 1787 } | 1784 } |
| OLD | NEW |