OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_frame.h" | 5 #include "chrome/browser/ui/views/frame/browser_frame.h" |
6 | 6 |
7 #include "base/chromeos/chromeos_version.h" | 7 #include "base/chromeos/chromeos_version.h" |
8 #include "base/i18n/rtl.h" | 8 #include "base/i18n/rtl.h" |
9 #include "chrome/browser/themes/theme_service.h" | 9 #include "chrome/browser/themes/theme_service.h" |
10 #include "chrome/browser/themes/theme_service_factory.h" | 10 #include "chrome/browser/themes/theme_service_factory.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 | 43 |
44 void BrowserFrame::InitBrowserFrame() { | 44 void BrowserFrame::InitBrowserFrame() { |
45 native_browser_frame_ = | 45 native_browser_frame_ = |
46 NativeBrowserFrame::CreateNativeBrowserFrame(this, browser_view_); | 46 NativeBrowserFrame::CreateNativeBrowserFrame(this, browser_view_); |
47 views::Widget::InitParams params; | 47 views::Widget::InitParams params; |
48 params.delegate = browser_view_; | 48 params.delegate = browser_view_; |
49 params.native_widget = native_browser_frame_->AsNativeWidget(); | 49 params.native_widget = native_browser_frame_->AsNativeWidget(); |
50 if (browser_view_->browser()->is_type_tabbed()) { | 50 if (browser_view_->browser()->is_type_tabbed()) { |
51 // Typed panel/popup can only return a size once the widget has been | 51 // Typed panel/popup can only return a size once the widget has been |
52 // created. | 52 // created. |
53 params.bounds = chrome::GetSavedWindowBounds(browser_view_->browser()); | 53 chrome::GetSavedWindowBoundsAndShowState(browser_view_->browser(), |
54 params.show_state = | 54 ¶ms.bounds, |
55 chrome::GetSavedWindowShowState(browser_view_->browser()); | 55 ¶ms.show_state); |
56 } | 56 } |
57 if (browser_view_->IsPanel()) { | 57 if (browser_view_->IsPanel()) { |
58 // We need to set the top-most bit when the panel window is created. | 58 // We need to set the top-most bit when the panel window is created. |
59 // There is a Windows bug/feature that would very likely prevent the window | 59 // There is a Windows bug/feature that would very likely prevent the window |
60 // from being changed to top-most after the window is created without | 60 // from being changed to top-most after the window is created without |
61 // activation. | 61 // activation. |
62 params.type = views::Widget::InitParams::TYPE_PANEL; | 62 params.type = views::Widget::InitParams::TYPE_PANEL; |
63 } | 63 } |
64 Init(params); | 64 Init(params); |
65 | 65 |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 | 139 |
140 AvatarMenuButton* BrowserFrame::GetAvatarMenuButton() { | 140 AvatarMenuButton* BrowserFrame::GetAvatarMenuButton() { |
141 return browser_frame_view_->avatar_button(); | 141 return browser_frame_view_->avatar_button(); |
142 } | 142 } |
143 | 143 |
144 #if !defined(OS_WIN) || defined(USE_AURA) | 144 #if !defined(OS_WIN) || defined(USE_AURA) |
145 bool BrowserFrame::ShouldLeaveOffsetNearTopBorder() { | 145 bool BrowserFrame::ShouldLeaveOffsetNearTopBorder() { |
146 return !IsMaximized(); | 146 return !IsMaximized(); |
147 } | 147 } |
148 #endif // OS_WIN | 148 #endif // OS_WIN |
OLD | NEW |