Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(911)

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 2288313002: Return the WebViewFrameWidget in RenderWidget::webwidget() if there (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 2612 matching lines...) Expand 10 before | Expand all | Expand 10 after
2623 frame_widget_->setIsTransparent(!opaque); 2623 frame_widget_->setIsTransparent(!opaque);
2624 if (compositor_) 2624 if (compositor_)
2625 compositor_->setHasTransparentBackground(!opaque); 2625 compositor_->setHasTransparentBackground(!opaque);
2626 } 2626 }
2627 2627
2628 void RenderViewImpl::OnSetActive(bool active) { 2628 void RenderViewImpl::OnSetActive(bool active) {
2629 if (webview()) 2629 if (webview())
2630 webview()->setIsActive(active); 2630 webview()->setIsActive(active);
2631 } 2631 }
2632 2632
2633 blink::WebWidget* RenderViewImpl::webwidget() const {
esprehn 2016/09/01 00:37:58 webWidget ? or widget() ?
2634 if (frame_widget_)
dcheng 2016/08/31 18:00:33 Should't this always be non-null while we're calli
2635 return frame_widget_;
2636
2637 return RenderWidget::webwidget();
2638 }
2639
2633 void RenderViewImpl::CloseForFrame() { 2640 void RenderViewImpl::CloseForFrame() {
2634 DCHECK(frame_widget_); 2641 DCHECK(frame_widget_);
2635 frame_widget_->close(); 2642 frame_widget_->close();
2636 frame_widget_ = nullptr; 2643 frame_widget_ = nullptr;
2637 } 2644 }
2638 2645
2639 void RenderViewImpl::Close() { 2646 void RenderViewImpl::Close() {
2640 // We need to grab a pointer to the doomed WebView before we destroy it. 2647 // We need to grab a pointer to the doomed WebView before we destroy it.
2641 WebView* doomed = webview_; 2648 WebView* doomed = webview_;
2642 RenderWidget::Close(); 2649 RenderWidget::Close();
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
3080 return render_frame->focused_pepper_plugin(); 3087 return render_frame->focused_pepper_plugin();
3081 } 3088 }
3082 frame = frame->traverseNext(false); 3089 frame = frame->traverseNext(false);
3083 } 3090 }
3084 3091
3085 return nullptr; 3092 return nullptr;
3086 } 3093 }
3087 #endif 3094 #endif
3088 3095
3089 } // namespace content 3096 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698