| OLD | NEW |
| 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/web_contents.h" | 9 #include "content/public/browser/web_contents.h" |
| 10 #include "ui/aura/window.h" | 10 #include "ui/aura/window.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 ContentsWebView::~ContentsWebView() { | 21 ContentsWebView::~ContentsWebView() { |
| 22 } | 22 } |
| 23 | 23 |
| 24 void ContentsWebView::SetStatusBubble(StatusBubbleViews* status_bubble) { | 24 void ContentsWebView::SetStatusBubble(StatusBubbleViews* status_bubble) { |
| 25 status_bubble_ = status_bubble; | 25 status_bubble_ = status_bubble; |
| 26 DCHECK(!status_bubble_ || status_bubble_->base_view() == this); | 26 DCHECK(!status_bubble_ || status_bubble_->base_view() == this); |
| 27 if (status_bubble_) | 27 if (status_bubble_) |
| 28 status_bubble_->Reposition(); | 28 status_bubble_->Reposition(); |
| 29 } | 29 } |
| 30 | 30 |
| 31 bool ContentsWebView::NeedsNotificationWhenVisibleBoundsChange() const { | 31 bool ContentsWebView::GetNeedsNotificationWhenVisibleBoundsChange() const { |
| 32 return true; | 32 return true; |
| 33 } | 33 } |
| 34 | 34 |
| 35 void ContentsWebView::OnVisibleBoundsChanged() { | 35 void ContentsWebView::OnVisibleBoundsChanged() { |
| 36 if (status_bubble_) | 36 if (status_bubble_) |
| 37 status_bubble_->Reposition(); | 37 status_bubble_->Reposition(); |
| 38 } | 38 } |
| 39 | 39 |
| 40 void ContentsWebView::ViewHierarchyChanged( | 40 void ContentsWebView::ViewHierarchyChanged( |
| 41 const ViewHierarchyChangedDetails& details) { | 41 const ViewHierarchyChangedDetails& details) { |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 cloned_layer_tree_->root()->SetBounds( | 100 cloned_layer_tree_->root()->SetBounds( |
| 101 gfx::Rect(origin, cloned_layer_tree_->root()->bounds().size())); | 101 gfx::Rect(origin, cloned_layer_tree_->root()->bounds().size())); |
| 102 layer()->Add(cloned_layer_tree_->root()); | 102 layer()->Add(cloned_layer_tree_->root()); |
| 103 } | 103 } |
| 104 | 104 |
| 105 void ContentsWebView::DestroyClonedLayer() { | 105 void ContentsWebView::DestroyClonedLayer() { |
| 106 cloned_layer_tree_.reset(); | 106 cloned_layer_tree_.reset(); |
| 107 SetPaintToLayer(false); | 107 SetPaintToLayer(false); |
| 108 set_layer_owner_delegate(NULL); | 108 set_layer_owner_delegate(NULL); |
| 109 } | 109 } |
| OLD | NEW |