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/renderer/render_view_impl.h" | 5 #include "content/renderer/render_view_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
454 WebFileChooserCompletion* completion; // MAY BE NULL to skip callback. | 454 WebFileChooserCompletion* completion; // MAY BE NULL to skip callback. |
455 }; | 455 }; |
456 | 456 |
457 namespace { | 457 namespace { |
458 | 458 |
459 class WebWidgetLockTarget : public MouseLockDispatcher::LockTarget { | 459 class WebWidgetLockTarget : public MouseLockDispatcher::LockTarget { |
460 public: | 460 public: |
461 explicit WebWidgetLockTarget(blink::WebWidget* webwidget) | 461 explicit WebWidgetLockTarget(blink::WebWidget* webwidget) |
462 : webwidget_(webwidget) {} | 462 : webwidget_(webwidget) {} |
463 | 463 |
464 virtual void OnLockMouseACK(bool succeeded) OVERRIDE { | 464 virtual void OnLockMouseACK(bool succeeded) override { |
465 if (succeeded) | 465 if (succeeded) |
466 webwidget_->didAcquirePointerLock(); | 466 webwidget_->didAcquirePointerLock(); |
467 else | 467 else |
468 webwidget_->didNotAcquirePointerLock(); | 468 webwidget_->didNotAcquirePointerLock(); |
469 } | 469 } |
470 | 470 |
471 virtual void OnMouseLockLost() OVERRIDE { | 471 virtual void OnMouseLockLost() override { |
472 webwidget_->didLosePointerLock(); | 472 webwidget_->didLosePointerLock(); |
473 } | 473 } |
474 | 474 |
475 virtual bool HandleMouseLockedInputEvent( | 475 virtual bool HandleMouseLockedInputEvent( |
476 const blink::WebMouseEvent &event) OVERRIDE { | 476 const blink::WebMouseEvent &event) override { |
477 // The WebWidget handles mouse lock in WebKit's handleInputEvent(). | 477 // The WebWidget handles mouse lock in WebKit's handleInputEvent(). |
478 return false; | 478 return false; |
479 } | 479 } |
480 | 480 |
481 private: | 481 private: |
482 blink::WebWidget* webwidget_; | 482 blink::WebWidget* webwidget_; |
483 }; | 483 }; |
484 | 484 |
485 bool TouchEnabled() { | 485 bool TouchEnabled() { |
486 // Based on the definition of chrome::kEnableTouchIcon. | 486 // Based on the definition of chrome::kEnableTouchIcon. |
(...skipping 3703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4190 std::vector<gfx::Size> sizes; | 4190 std::vector<gfx::Size> sizes; |
4191 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); | 4191 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); |
4192 if (!url.isEmpty()) | 4192 if (!url.isEmpty()) |
4193 urls.push_back( | 4193 urls.push_back( |
4194 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); | 4194 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); |
4195 } | 4195 } |
4196 SendUpdateFaviconURL(urls); | 4196 SendUpdateFaviconURL(urls); |
4197 } | 4197 } |
4198 | 4198 |
4199 } // namespace content | 4199 } // namespace content |
OLD | NEW |