| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 browser_frame_view_->UpdateThrobber(running); | 67 browser_frame_view_->UpdateThrobber(running); |
| 68 } | 68 } |
| 69 | 69 |
| 70 views::View* BrowserFrame::GetFrameView() const { | 70 views::View* BrowserFrame::GetFrameView() const { |
| 71 return browser_frame_view_; | 71 return browser_frame_view_; |
| 72 } | 72 } |
| 73 | 73 |
| 74 void BrowserFrame::TabStripDisplayModeChanged() { | 74 void BrowserFrame::TabStripDisplayModeChanged() { |
| 75 if (GetRootView()->has_children()) { | 75 if (GetRootView()->has_children()) { |
| 76 // Make sure the child of the root view gets Layout again. | 76 // Make sure the child of the root view gets Layout again. |
| 77 GetRootView()->GetChildViewAt(0)->InvalidateLayout(); | 77 GetRootView()->child_at(0)->InvalidateLayout(); |
| 78 } | 78 } |
| 79 GetRootView()->Layout(); | 79 GetRootView()->Layout(); |
| 80 native_browser_frame_->TabStripDisplayModeChanged(); | 80 native_browser_frame_->TabStripDisplayModeChanged(); |
| 81 } | 81 } |
| 82 | 82 |
| 83 /////////////////////////////////////////////////////////////////////////////// | 83 /////////////////////////////////////////////////////////////////////////////// |
| 84 // BrowserFrameWin, views::Window overrides: | 84 // BrowserFrameWin, views::Window overrides: |
| 85 | 85 |
| 86 bool BrowserFrame::IsMaximized() const { | 86 bool BrowserFrame::IsMaximized() const { |
| 87 #if defined(OS_CHROMEOS) | 87 #if defined(OS_CHROMEOS) |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 // When running under remote desktop, if the remote desktop client is not | 127 // When running under remote desktop, if the remote desktop client is not |
| 128 // active on the users desktop, then none of the windows contained in the | 128 // active on the users desktop, then none of the windows contained in the |
| 129 // remote desktop will be activated. However, NativeWidgetWin::Activate() | 129 // remote desktop will be activated. However, NativeWidgetWin::Activate() |
| 130 // will still bring this browser window to the foreground. We explicitly | 130 // will still bring this browser window to the foreground. We explicitly |
| 131 // set ourselves as the last active browser window to ensure that we get | 131 // set ourselves as the last active browser window to ensure that we get |
| 132 // treated as such by the rest of Chrome. | 132 // treated as such by the rest of Chrome. |
| 133 BrowserList::SetLastActive(browser_view_->browser()); | 133 BrowserList::SetLastActive(browser_view_->browser()); |
| 134 } | 134 } |
| 135 Widget::OnNativeWidgetActivationChanged(active); | 135 Widget::OnNativeWidgetActivationChanged(active); |
| 136 } | 136 } |
| OLD | NEW |