OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
537 || (event.button == WebMouseEvent::ButtonLeft | 537 || (event.button == WebMouseEvent::ButtonLeft |
538 && event.modifiers & WebMouseEvent::ControlKey)) | 538 && event.modifiers & WebMouseEvent::ControlKey)) |
539 mouseContextMenu(event); | 539 mouseContextMenu(event); |
540 #else | 540 #else |
541 if (event.button == WebMouseEvent::ButtonRight) | 541 if (event.button == WebMouseEvent::ButtonRight) |
542 mouseContextMenu(event); | 542 mouseContextMenu(event); |
543 #endif | 543 #endif |
544 } | 544 } |
545 } | 545 } |
546 | 546 |
| 547 void WebViewImpl::setDisplayMode(WebDisplayMode mode) |
| 548 { |
| 549 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) |
| 550 return; |
| 551 |
| 552 mainFrameImpl()->frameView()->setDisplayMode(mode); |
| 553 } |
| 554 |
547 void WebViewImpl::mouseContextMenu(const WebMouseEvent& event) | 555 void WebViewImpl::mouseContextMenu(const WebMouseEvent& event) |
548 { | 556 { |
549 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 557 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) |
550 return; | 558 return; |
551 | 559 |
552 m_page->contextMenuController().clearContextMenu(); | 560 m_page->contextMenuController().clearContextMenu(); |
553 | 561 |
554 PlatformMouseEventBuilder pme(mainFrameImpl()->frameView(), event); | 562 PlatformMouseEventBuilder pme(mainFrameImpl()->frameView(), event); |
555 | 563 |
556 // Find the right target frame. See issue 1186900. | 564 // Find the right target frame. See issue 1186900. |
(...skipping 3992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4549 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4557 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
4550 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 4558 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
4551 } | 4559 } |
4552 | 4560 |
4553 void WebViewImpl::forceNextWebGLContextCreationToFail() | 4561 void WebViewImpl::forceNextWebGLContextCreationToFail() |
4554 { | 4562 { |
4555 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); | 4563 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); |
4556 } | 4564 } |
4557 | 4565 |
4558 } // namespace blink | 4566 } // namespace blink |
OLD | NEW |