| 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.h" | 10 #include "chrome/browser/ui/browser.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 void BrowserFrame::InitBrowserFrame() { | 41 void BrowserFrame::InitBrowserFrame() { |
| 42 native_browser_frame_ = | 42 native_browser_frame_ = |
| 43 NativeBrowserFrame::CreateNativeBrowserFrame(this, browser_view_); | 43 NativeBrowserFrame::CreateNativeBrowserFrame(this, browser_view_); |
| 44 views::Widget::InitParams params; | 44 views::Widget::InitParams params; |
| 45 params.delegate = browser_view_; | 45 params.delegate = browser_view_; |
| 46 params.native_widget = native_browser_frame_->AsNativeWidget(); | 46 params.native_widget = native_browser_frame_->AsNativeWidget(); |
| 47 if (browser_view_->browser()->is_type_tabbed()) { | 47 if (browser_view_->browser()->is_type_tabbed()) { |
| 48 // Typed panel/popup can only return a size once the widget has been | 48 // Typed panel/popup can only return a size once the widget has been |
| 49 // created. | 49 // created. |
| 50 params.bounds = browser_view_->browser()->GetSavedWindowBounds(); | 50 params.bounds = browser_view_->browser()->GetSavedWindowBounds(); |
| 51 params.show_state = browser_view_->browser()->GetSavedWindowShowState(); | 51 params.maximize = browser_view_->browser()->GetSavedWindowShowState() == |
| 52 ui::SHOW_STATE_MAXIMIZED; |
| 52 } | 53 } |
| 53 Init(params); | 54 Init(params); |
| 54 #if defined(OS_CHROMEOS) | 55 #if defined(OS_CHROMEOS) |
| 55 // On ChromeOS we always want top-level windows to appear active. | 56 // On ChromeOS we always want top-level windows to appear active. |
| 56 if (!browser_view_->IsBrowserTypePopup()) | 57 if (!browser_view_->IsBrowserTypePopup()) |
| 57 DisableInactiveRendering(); | 58 DisableInactiveRendering(); |
| 58 #endif | 59 #endif |
| 59 } | 60 } |
| 60 | 61 |
| 61 int BrowserFrame::GetMinimizeButtonOffset() const { | 62 int BrowserFrame::GetMinimizeButtonOffset() const { |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 // When running under remote desktop, if the remote desktop client is not | 135 // When running under remote desktop, if the remote desktop client is not |
| 135 // active on the users desktop, then none of the windows contained in the | 136 // active on the users desktop, then none of the windows contained in the |
| 136 // remote desktop will be activated. However, NativeWidgetWin::Activate() | 137 // remote desktop will be activated. However, NativeWidgetWin::Activate() |
| 137 // will still bring this browser window to the foreground. We explicitly | 138 // will still bring this browser window to the foreground. We explicitly |
| 138 // set ourselves as the last active browser window to ensure that we get | 139 // set ourselves as the last active browser window to ensure that we get |
| 139 // treated as such by the rest of Chrome. | 140 // treated as such by the rest of Chrome. |
| 140 BrowserList::SetLastActive(browser_view_->browser()); | 141 BrowserList::SetLastActive(browser_view_->browser()); |
| 141 } | 142 } |
| 142 Widget::OnNativeWidgetActivationChanged(active); | 143 Widget::OnNativeWidgetActivationChanged(active); |
| 143 } | 144 } |
| OLD | NEW |