OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/views/frame/browser_frame_win.h" | 5 #include "chrome/browser/views/frame/browser_frame_win.h" |
6 | 6 |
7 #include <dwmapi.h> | 7 #include <dwmapi.h> |
8 #include <shellapi.h> | 8 #include <shellapi.h> |
9 | 9 |
10 #include <set> | 10 #include <set> |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 // This is implemented for a different interface than GetThemeProvider is, | 104 // This is implemented for a different interface than GetThemeProvider is, |
105 // but they mean the same things. | 105 // but they mean the same things. |
106 return GetThemeProvider(); | 106 return GetThemeProvider(); |
107 } | 107 } |
108 | 108 |
109 bool BrowserFrameWin::AlwaysUseNativeFrame() const { | 109 bool BrowserFrameWin::AlwaysUseNativeFrame() const { |
110 // App panel windows draw their own frame. | 110 // App panel windows draw their own frame. |
111 if (browser_view_->IsBrowserTypePanel()) | 111 if (browser_view_->IsBrowserTypePanel()) |
112 return false; | 112 return false; |
113 | 113 |
114 if (browser_view_->browser()->type() == Browser::TYPE_EXTENSION_APP) | |
115 return false; | |
116 | |
117 // We don't theme popup or app windows, so regardless of whether or not a | 114 // We don't theme popup or app windows, so regardless of whether or not a |
118 // theme is active for normal browser windows, we don't want to use the custom | 115 // theme is active for normal browser windows, we don't want to use the custom |
119 // frame for popups/apps. | 116 // frame for popups/apps. |
120 if (!browser_view_->IsBrowserTypeNormal() && win_util::ShouldUseVistaFrame()) | 117 if (!browser_view_->IsBrowserTypeNormal() && win_util::ShouldUseVistaFrame()) |
121 return true; | 118 return true; |
122 | 119 |
123 // Otherwise, we use the native frame when we're told we should by the theme | 120 // Otherwise, we use the native frame when we're told we should by the theme |
124 // provider (e.g. no custom theme is active). | 121 // provider (e.g. no custom theme is active). |
125 return GetThemeProvider()->ShouldUseNativeFrame(); | 122 return GetThemeProvider()->ShouldUseNativeFrame(); |
126 } | 123 } |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
309 gfx::Rect tabstrip_bounds( | 306 gfx::Rect tabstrip_bounds( |
310 GetBoundsForTabStrip(browser_view_->tabstrip())); | 307 GetBoundsForTabStrip(browser_view_->tabstrip())); |
311 margins.cyTopHeight = (browser_view_->UseVerticalTabs() ? | 308 margins.cyTopHeight = (browser_view_->UseVerticalTabs() ? |
312 tabstrip_bounds.y() : tabstrip_bounds.bottom()) + kDWMFrameTopOffset; | 309 tabstrip_bounds.y() : tabstrip_bounds.bottom()) + kDWMFrameTopOffset; |
313 } | 310 } |
314 } else { | 311 } else { |
315 // For popup and app windows we want to use the default margins. | 312 // For popup and app windows we want to use the default margins. |
316 } | 313 } |
317 DwmExtendFrameIntoClientArea(GetNativeView(), &margins); | 314 DwmExtendFrameIntoClientArea(GetNativeView(), &margins); |
318 } | 315 } |
OLD | NEW |