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

Side by Side Diff: chrome/browser/ui/views/frame/contents_web_view.cc

Issue 2458833003: Revert of [M55] Generalize layer mirroring for phantom windows (Closed)
Patch Set: Created 4 years, 1 month 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/ui/views/frame/contents_web_view.h" 5 #include "chrome/browser/ui/views/frame/contents_web_view.h"
6 6
7 #include "chrome/browser/themes/theme_properties.h" 7 #include "chrome/browser/themes/theme_properties.h"
8 #include "chrome/browser/ui/views/status_bubble_views.h" 8 #include "chrome/browser/ui/views/status_bubble_views.h"
9 #include "content/public/browser/render_widget_host_view.h" 9 #include "content/public/browser/render_widget_host_view.h"
10 #include "content/public/browser/web_contents.h" 10 #include "content/public/browser/web_contents.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 old_layer->Add(cloned_layer_tree_->release()); 91 old_layer->Add(cloned_layer_tree_->release());
92 cloned_layer_tree_.reset(); 92 cloned_layer_tree_.reset();
93 } 93 }
94 94
95 void ContentsWebView::CloneWebContentsLayer() { 95 void ContentsWebView::CloneWebContentsLayer() {
96 if (!web_contents()) 96 if (!web_contents())
97 return; 97 return;
98 #if defined(USE_AURA) 98 #if defined(USE_AURA)
99 // We don't need to clone the layers on non-Aura (Mac), because closing an 99 // We don't need to clone the layers on non-Aura (Mac), because closing an
100 // NSWindow does not animate. 100 // NSWindow does not animate.
101 cloned_layer_tree_ = wm::RecreateLayers(web_contents()->GetNativeView()); 101 cloned_layer_tree_ =
102 wm::RecreateLayers(web_contents()->GetNativeView(), nullptr);
102 #endif 103 #endif
103 if (!cloned_layer_tree_ || !cloned_layer_tree_->root()) { 104 if (!cloned_layer_tree_ || !cloned_layer_tree_->root()) {
104 cloned_layer_tree_.reset(); 105 cloned_layer_tree_.reset();
105 return; 106 return;
106 } 107 }
107 108
108 SetPaintToLayer(true); 109 SetPaintToLayer(true);
109 set_layer_owner_delegate(this); 110 set_layer_owner_delegate(this);
110 111
111 // The cloned layer is in a different coordinate system them our layer (which 112 // The cloned layer is in a different coordinate system them our layer (which
(...skipping 10 matching lines...) Expand all
122 cloned_layer_tree_.reset(); 123 cloned_layer_tree_.reset();
123 SetPaintToLayer(false); 124 SetPaintToLayer(false);
124 set_layer_owner_delegate(nullptr); 125 set_layer_owner_delegate(nullptr);
125 } 126 }
126 127
127 void ContentsWebView::RenderViewReady() { 128 void ContentsWebView::RenderViewReady() {
128 // Apply the theme color to be the default background on startup. 129 // Apply the theme color to be the default background on startup.
129 OnThemeChanged(); 130 OnThemeChanged();
130 WebView::RenderViewReady(); 131 WebView::RenderViewReady();
131 } 132 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/multi_user/user_switch_animator_chromeos.cc ('k') | components/exo/surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698