| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_frame.h" | 5 #include "chrome/browser/ui/views/frame/browser_frame.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "chrome/browser/themes/theme_service.h" | 8 #include "chrome/browser/themes/theme_service.h" |
| 9 #include "chrome/browser/themes/theme_service_factory.h" | 9 #include "chrome/browser/themes/theme_service_factory.h" |
| 10 #include "chrome/browser/ui/browser_list.h" | 10 #include "chrome/browser/ui/browser_list.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 browser_frame_view_->UpdateThrobber(running); | 65 browser_frame_view_->UpdateThrobber(running); |
| 66 } | 66 } |
| 67 | 67 |
| 68 views::View* BrowserFrame::GetFrameView() const { | 68 views::View* BrowserFrame::GetFrameView() const { |
| 69 return browser_frame_view_; | 69 return browser_frame_view_; |
| 70 } | 70 } |
| 71 | 71 |
| 72 void BrowserFrame::TabStripDisplayModeChanged() { | 72 void BrowserFrame::TabStripDisplayModeChanged() { |
| 73 if (GetRootView()->has_children()) { | 73 if (GetRootView()->has_children()) { |
| 74 // Make sure the child of the root view gets Layout again. | 74 // Make sure the child of the root view gets Layout again. |
| 75 GetRootView()->GetChildViewAt(0)->InvalidateLayout(); | 75 GetRootView()->child_at(0)->InvalidateLayout(); |
| 76 } | 76 } |
| 77 GetRootView()->Layout(); | 77 GetRootView()->Layout(); |
| 78 native_browser_frame_->TabStripDisplayModeChanged(); | 78 native_browser_frame_->TabStripDisplayModeChanged(); |
| 79 } | 79 } |
| 80 | 80 |
| 81 /////////////////////////////////////////////////////////////////////////////// | 81 /////////////////////////////////////////////////////////////////////////////// |
| 82 // BrowserFrameWin, views::Window overrides: | 82 // BrowserFrameWin, views::Window overrides: |
| 83 | 83 |
| 84 bool BrowserFrame::IsMaximized() const { | 84 bool BrowserFrame::IsMaximized() const { |
| 85 #if defined(OS_CHROMEOS) | 85 #if defined(OS_CHROMEOS) |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 // active on the users desktop, then none of the windows contained in the | 126 // active on the users desktop, then none of the windows contained in the |
| 127 // remote desktop will be activated. However, NativeWidgetWin::Activate() | 127 // remote desktop will be activated. However, NativeWidgetWin::Activate() |
| 128 // will still bring this browser window to the foreground. We explicitly | 128 // will still bring this browser window to the foreground. We explicitly |
| 129 // set ourselves as the last active browser window to ensure that we get | 129 // set ourselves as the last active browser window to ensure that we get |
| 130 // treated as such by the rest of Chrome. | 130 // treated as such by the rest of Chrome. |
| 131 BrowserList::SetLastActive(browser_view_->browser()); | 131 BrowserList::SetLastActive(browser_view_->browser()); |
| 132 } | 132 } |
| 133 Widget::OnNativeWidgetActivationChanged(active); | 133 Widget::OnNativeWidgetActivationChanged(active); |
| 134 } | 134 } |
| 135 | 135 |
| OLD | NEW |