Chromium Code Reviews| 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) | |
|
Peter Kasting
2010/04/28 04:45:17
Nit: Add a comment about this (and, if applicable,
| |
| 115 return false; | |
| 116 | |
| 114 // We don't theme popup or app windows, so regardless of whether or not a | 117 // We don't theme popup or app windows, so regardless of whether or not a |
| 115 // theme is active for normal browser windows, we don't want to use the custom | 118 // theme is active for normal browser windows, we don't want to use the custom |
| 116 // frame for popups/apps. | 119 // frame for popups/apps. |
| 117 if (!browser_view_->IsBrowserTypeNormal() && win_util::ShouldUseVistaFrame()) | 120 if (!browser_view_->IsBrowserTypeNormal() && win_util::ShouldUseVistaFrame()) |
| 118 return true; | 121 return true; |
| 119 | 122 |
| 120 // Otherwise, we use the native frame when we're told we should by the theme | 123 // Otherwise, we use the native frame when we're told we should by the theme |
| 121 // provider (e.g. no custom theme is active). | 124 // provider (e.g. no custom theme is active). |
| 122 return GetThemeProvider()->ShouldUseNativeFrame(); | 125 return GetThemeProvider()->ShouldUseNativeFrame(); |
| 123 } | 126 } |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 317 | 320 |
| 318 DWORD window_style = GetWindowLong(GWL_STYLE); | 321 DWORD window_style = GetWindowLong(GWL_STYLE); |
| 319 if (browser_view_->UsingSideTabs()) { | 322 if (browser_view_->UsingSideTabs()) { |
| 320 if (window_style & WS_CAPTION) | 323 if (window_style & WS_CAPTION) |
| 321 SetWindowLong(GWL_STYLE, window_style & ~WS_CAPTION); | 324 SetWindowLong(GWL_STYLE, window_style & ~WS_CAPTION); |
| 322 } else { | 325 } else { |
| 323 if (!(window_style & WS_CAPTION)) | 326 if (!(window_style & WS_CAPTION)) |
| 324 SetWindowLong(GWL_STYLE, window_style | WS_CAPTION); | 327 SetWindowLong(GWL_STYLE, window_style | WS_CAPTION); |
| 325 } | 328 } |
| 326 } | 329 } |
| OLD | NEW |