| 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 <stdint.h> | 7 #include <stdint.h> |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 1099 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1110 location_bar->FocusLocation(select_all); | 1110 location_bar->FocusLocation(select_all); |
| 1111 } else { | 1111 } else { |
| 1112 // If none of location bar got focus, then clear focus. | 1112 // If none of location bar got focus, then clear focus. |
| 1113 views::FocusManager* focus_manager = GetFocusManager(); | 1113 views::FocusManager* focus_manager = GetFocusManager(); |
| 1114 DCHECK(focus_manager); | 1114 DCHECK(focus_manager); |
| 1115 focus_manager->ClearFocus(); | 1115 focus_manager->ClearFocus(); |
| 1116 } | 1116 } |
| 1117 } | 1117 } |
| 1118 | 1118 |
| 1119 void BrowserView::UpdateReloadStopState(bool is_loading, bool force) { | 1119 void BrowserView::UpdateReloadStopState(bool is_loading, bool force) { |
| 1120 toolbar_->reload_button()->ChangeMode( | 1120 if (toolbar_->reload_button()) { |
| 1121 is_loading ? ReloadButton::MODE_STOP : ReloadButton::MODE_RELOAD, force); | 1121 toolbar_->reload_button()->ChangeMode( |
| 1122 is_loading ? ReloadButton::MODE_STOP : ReloadButton::MODE_RELOAD, |
| 1123 force); |
| 1124 } |
| 1122 } | 1125 } |
| 1123 | 1126 |
| 1124 void BrowserView::UpdateToolbar(content::WebContents* contents) { | 1127 void BrowserView::UpdateToolbar(content::WebContents* contents) { |
| 1125 // We may end up here during destruction. | 1128 // We may end up here during destruction. |
| 1126 if (toolbar_) | 1129 if (toolbar_) |
| 1127 toolbar_->Update(contents); | 1130 toolbar_->Update(contents); |
| 1128 frame_->UpdateToolbar(); | 1131 frame_->UpdateToolbar(); |
| 1129 } | 1132 } |
| 1130 | 1133 |
| 1131 void BrowserView::ResetToolbarTabState(content::WebContents* contents) { | 1134 void BrowserView::ResetToolbarTabState(content::WebContents* contents) { |
| (...skipping 1555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2687 return immersive_mode_controller()->IsEnabled(); | 2690 return immersive_mode_controller()->IsEnabled(); |
| 2688 } | 2691 } |
| 2689 | 2692 |
| 2690 views::Widget* BrowserView::GetBubbleAssociatedWidget() { | 2693 views::Widget* BrowserView::GetBubbleAssociatedWidget() { |
| 2691 return GetWidget(); | 2694 return GetWidget(); |
| 2692 } | 2695 } |
| 2693 | 2696 |
| 2694 gfx::Rect BrowserView::GetTopContainerBoundsInScreen() { | 2697 gfx::Rect BrowserView::GetTopContainerBoundsInScreen() { |
| 2695 return top_container_->GetBoundsInScreen(); | 2698 return top_container_->GetBoundsInScreen(); |
| 2696 } | 2699 } |
| OLD | NEW |