| 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 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 1593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1604 | 1604 |
| 1605 WebWidget* RenderViewImpl::createPopupMenu(blink::WebPopupType popup_type) { | 1605 WebWidget* RenderViewImpl::createPopupMenu(blink::WebPopupType popup_type) { |
| 1606 RenderWidget* widget = RenderWidget::Create(GetRoutingID(), compositor_deps_, | 1606 RenderWidget* widget = RenderWidget::Create(GetRoutingID(), compositor_deps_, |
| 1607 popup_type, screen_info_); | 1607 popup_type, screen_info_); |
| 1608 if (!widget) | 1608 if (!widget) |
| 1609 return NULL; | 1609 return NULL; |
| 1610 if (screen_metrics_emulator_) { | 1610 if (screen_metrics_emulator_) { |
| 1611 widget->SetPopupOriginAdjustmentsForEmulation( | 1611 widget->SetPopupOriginAdjustmentsForEmulation( |
| 1612 screen_metrics_emulator_.get()); | 1612 screen_metrics_emulator_.get()); |
| 1613 } | 1613 } |
| 1614 return widget->webwidget(); | 1614 return widget->GetWebWidget(); |
| 1615 } | 1615 } |
| 1616 | 1616 |
| 1617 WebStorageNamespace* RenderViewImpl::createSessionStorageNamespace() { | 1617 WebStorageNamespace* RenderViewImpl::createSessionStorageNamespace() { |
| 1618 CHECK(session_storage_namespace_id_ != kInvalidSessionStorageNamespaceId); | 1618 CHECK(session_storage_namespace_id_ != kInvalidSessionStorageNamespaceId); |
| 1619 return new WebStorageNamespaceImpl(session_storage_namespace_id_); | 1619 return new WebStorageNamespaceImpl(session_storage_namespace_id_); |
| 1620 } | 1620 } |
| 1621 | 1621 |
| 1622 void RenderViewImpl::printPage(WebLocalFrame* frame) { | 1622 void RenderViewImpl::printPage(WebLocalFrame* frame) { |
| 1623 FOR_EACH_OBSERVER(RenderViewObserver, observers_, | 1623 FOR_EACH_OBSERVER(RenderViewObserver, observers_, |
| 1624 PrintPage(frame, input_handler().handling_input_event())); | 1624 PrintPage(frame, input_handler().handling_input_event())); |
| (...skipping 969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2594 frame_widget_->setIsTransparent(!opaque); | 2594 frame_widget_->setIsTransparent(!opaque); |
| 2595 if (compositor_) | 2595 if (compositor_) |
| 2596 compositor_->setHasTransparentBackground(!opaque); | 2596 compositor_->setHasTransparentBackground(!opaque); |
| 2597 } | 2597 } |
| 2598 | 2598 |
| 2599 void RenderViewImpl::OnSetActive(bool active) { | 2599 void RenderViewImpl::OnSetActive(bool active) { |
| 2600 if (webview()) | 2600 if (webview()) |
| 2601 webview()->setIsActive(active); | 2601 webview()->setIsActive(active); |
| 2602 } | 2602 } |
| 2603 | 2603 |
| 2604 blink::WebWidget* RenderViewImpl::GetWebWidget() const { |
| 2605 if (frame_widget_) |
| 2606 return frame_widget_; |
| 2607 |
| 2608 return RenderWidget::GetWebWidget(); |
| 2609 } |
| 2610 |
| 2604 void RenderViewImpl::CloseForFrame() { | 2611 void RenderViewImpl::CloseForFrame() { |
| 2605 DCHECK(frame_widget_); | 2612 DCHECK(frame_widget_); |
| 2606 frame_widget_->close(); | 2613 frame_widget_->close(); |
| 2607 frame_widget_ = nullptr; | 2614 frame_widget_ = nullptr; |
| 2608 } | 2615 } |
| 2609 | 2616 |
| 2610 void RenderViewImpl::Close() { | 2617 void RenderViewImpl::Close() { |
| 2611 // We need to grab a pointer to the doomed WebView before we destroy it. | 2618 // We need to grab a pointer to the doomed WebView before we destroy it. |
| 2612 WebView* doomed = webview_; | 2619 WebView* doomed = webview_; |
| 2613 RenderWidget::Close(); | 2620 RenderWidget::Close(); |
| (...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3051 return render_frame->focused_pepper_plugin(); | 3058 return render_frame->focused_pepper_plugin(); |
| 3052 } | 3059 } |
| 3053 frame = frame->traverseNext(false); | 3060 frame = frame->traverseNext(false); |
| 3054 } | 3061 } |
| 3055 | 3062 |
| 3056 return nullptr; | 3063 return nullptr; |
| 3057 } | 3064 } |
| 3058 #endif | 3065 #endif |
| 3059 | 3066 |
| 3060 } // namespace content | 3067 } // namespace content |
| OLD | NEW |