Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "chrome/browser/ui/views/frame/browser_view.h" | 5 #include "chrome/browser/ui/views/frame/browser_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 772 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 783 | 783 |
| 784 // We don't properly support animating the bookmark bar to and from the | 784 // We don't properly support animating the bookmark bar to and from the |
| 785 // detached state in immersive fullscreen. | 785 // detached state in immersive fullscreen. |
| 786 bool detached_changed = (new_state == BookmarkBar::DETACHED) || | 786 bool detached_changed = (new_state == BookmarkBar::DETACHED) || |
| 787 bookmark_bar_view_->IsDetached(); | 787 bookmark_bar_view_->IsDetached(); |
| 788 if (detached_changed && immersive_mode_controller_->IsEnabled()) | 788 if (detached_changed && immersive_mode_controller_->IsEnabled()) |
| 789 change_type = BookmarkBar::DONT_ANIMATE_STATE_CHANGE; | 789 change_type = BookmarkBar::DONT_ANIMATE_STATE_CHANGE; |
| 790 | 790 |
| 791 bookmark_bar_view_->SetBookmarkBarState(new_state, change_type); | 791 bookmark_bar_view_->SetBookmarkBarState(new_state, change_type); |
| 792 } | 792 } |
| 793 if (MaybeShowBookmarkBar(GetActiveWebContents())) | 793 if (MaybeShowBookmarkBar(GetActiveWebContents())) { |
| 794 Layout(); | 794 Layout(); |
| 795 content::RenderWidgetHostView* rwhv = | |
|
sky
2015/03/25 20:45:36
Won't Layout() end up in ContentsLayoutManager and
scottmg
2015/03/25 22:22:06
Yeah, it does. On the initial navigate, the delega
| |
| 796 GetActiveWebContents()->GetRenderWidgetHostView(); | |
| 797 if (rwhv) | |
| 798 rwhv->SetSize(contents_container_->size()); | |
| 799 } | |
| 795 } | 800 } |
| 796 | 801 |
| 797 void BrowserView::UpdateDevTools() { | 802 void BrowserView::UpdateDevTools() { |
| 798 UpdateDevToolsForContents(GetActiveWebContents(), true); | 803 UpdateDevToolsForContents(GetActiveWebContents(), true); |
| 799 Layout(); | 804 Layout(); |
| 800 } | 805 } |
| 801 | 806 |
| 802 void BrowserView::UpdateLoadingAnimations(bool should_animate) { | 807 void BrowserView::UpdateLoadingAnimations(bool should_animate) { |
| 803 if (should_animate) { | 808 if (should_animate) { |
| 804 if (!loading_animation_timer_.IsRunning()) { | 809 if (!loading_animation_timer_.IsRunning()) { |
| (...skipping 1810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2615 return immersive_mode_controller()->IsEnabled(); | 2620 return immersive_mode_controller()->IsEnabled(); |
| 2616 } | 2621 } |
| 2617 | 2622 |
| 2618 views::Widget* BrowserView::GetBubbleAssociatedWidget() { | 2623 views::Widget* BrowserView::GetBubbleAssociatedWidget() { |
| 2619 return GetWidget(); | 2624 return GetWidget(); |
| 2620 } | 2625 } |
| 2621 | 2626 |
| 2622 gfx::Rect BrowserView::GetTopContainerBoundsInScreen() { | 2627 gfx::Rect BrowserView::GetTopContainerBoundsInScreen() { |
| 2623 return top_container_->GetBoundsInScreen(); | 2628 return top_container_->GetBoundsInScreen(); |
| 2624 } | 2629 } |
| OLD | NEW |