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