OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/browser/web_contents/web_contents_impl.h" | 5 #include "content/browser/web_contents/web_contents_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 1302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1313 bool* is_keyboard_shortcut) { | 1313 bool* is_keyboard_shortcut) { |
1314 return delegate_ && | 1314 return delegate_ && |
1315 delegate_->PreHandleKeyboardEvent(this, event, is_keyboard_shortcut); | 1315 delegate_->PreHandleKeyboardEvent(this, event, is_keyboard_shortcut); |
1316 } | 1316 } |
1317 | 1317 |
1318 void WebContentsImpl::HandleKeyboardEvent(const NativeWebKeyboardEvent& event) { | 1318 void WebContentsImpl::HandleKeyboardEvent(const NativeWebKeyboardEvent& event) { |
1319 if (delegate_) | 1319 if (delegate_) |
1320 delegate_->HandleKeyboardEvent(this, event); | 1320 delegate_->HandleKeyboardEvent(this, event); |
1321 } | 1321 } |
1322 | 1322 |
| 1323 bool WebContentsImpl::PreHandleWheelEvent( |
| 1324 const WebKit::WebMouseWheelEvent& event) { |
| 1325 if (delegate_ && |
| 1326 event.wheelTicksY && |
| 1327 (event.modifiers & WebKit::WebInputEvent::ControlKey)) { |
| 1328 delegate_->ContentsZoomChange(event.wheelTicksY > 0); |
| 1329 return true; |
| 1330 } |
| 1331 |
| 1332 return false; |
| 1333 } |
| 1334 |
1323 void WebContentsImpl::HandleMouseDown() { | 1335 void WebContentsImpl::HandleMouseDown() { |
1324 if (delegate_) | 1336 if (delegate_) |
1325 delegate_->HandleMouseDown(); | 1337 delegate_->HandleMouseDown(); |
1326 } | 1338 } |
1327 | 1339 |
1328 void WebContentsImpl::HandleMouseUp() { | 1340 void WebContentsImpl::HandleMouseUp() { |
1329 if (delegate_) | 1341 if (delegate_) |
1330 delegate_->HandleMouseUp(); | 1342 delegate_->HandleMouseUp(); |
1331 } | 1343 } |
1332 | 1344 |
(...skipping 2159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3492 | 3504 |
3493 BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() const { | 3505 BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() const { |
3494 return browser_plugin_guest_.get(); | 3506 return browser_plugin_guest_.get(); |
3495 } | 3507 } |
3496 | 3508 |
3497 BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() const { | 3509 BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() const { |
3498 return browser_plugin_embedder_.get(); | 3510 return browser_plugin_embedder_.get(); |
3499 } | 3511 } |
3500 | 3512 |
3501 } // namespace content | 3513 } // namespace content |
OLD | NEW |