| 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_win.h" | 5 #include "chrome/browser/ui/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 #include <set> | 9 #include <set> |
| 10 | 10 |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 BuildSystemMenuForAppOrPopupWindow(); | 292 BuildSystemMenuForAppOrPopupWindow(); |
| 293 system_menu_.reset( | 293 system_menu_.reset( |
| 294 new views::NativeMenuWin(system_menu_contents_.get(), GetNativeWindow())); | 294 new views::NativeMenuWin(system_menu_contents_.get(), GetNativeWindow())); |
| 295 system_menu_->Rebuild(); | 295 system_menu_->Rebuild(); |
| 296 } | 296 } |
| 297 | 297 |
| 298 int BrowserFrameWin::GetMinimizeButtonOffset() const { | 298 int BrowserFrameWin::GetMinimizeButtonOffset() const { |
| 299 int minimize_button_offset = | 299 int minimize_button_offset = |
| 300 GetMinimizeButtonOffsetForWindow(GetNativeView()); | 300 GetMinimizeButtonOffsetForWindow(GetNativeView()); |
| 301 | 301 |
| 302 if (minimize_button_offset) | 302 if (minimize_button_offset > 0) |
| 303 return minimize_button_offset; | 303 return minimize_button_offset; |
| 304 | 304 |
| 305 // If we fail to get the minimize button offset via the WM_GETTITLEBARINFOEX | 305 // If we fail to get the minimize button offset via the WM_GETTITLEBARINFOEX |
| 306 // message then calculate and return this via the | 306 // message then calculate and return this via the |
| 307 // cached_minimize_button_x_delta_ member value. Please see | 307 // cached_minimize_button_x_delta_ member value. Please see |
| 308 // CacheMinimizeButtonDelta() for more details. | 308 // CacheMinimizeButtonDelta() for more details. |
| 309 DCHECK(cached_minimize_button_x_delta_); | 309 DCHECK(cached_minimize_button_x_delta_); |
| 310 | 310 |
| 311 RECT client_rect = {0}; | 311 RECT client_rect = {0}; |
| 312 GetClientRect(&client_rect); | 312 GetClientRect(&client_rect); |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 566 | 566 |
| 567 //////////////////////////////////////////////////////////////////////////////// | 567 //////////////////////////////////////////////////////////////////////////////// |
| 568 // NativeBrowserFrame, public: | 568 // NativeBrowserFrame, public: |
| 569 | 569 |
| 570 // static | 570 // static |
| 571 NativeBrowserFrame* NativeBrowserFrame::CreateNativeBrowserFrame( | 571 NativeBrowserFrame* NativeBrowserFrame::CreateNativeBrowserFrame( |
| 572 BrowserFrame* browser_frame, | 572 BrowserFrame* browser_frame, |
| 573 BrowserView* browser_view) { | 573 BrowserView* browser_view) { |
| 574 return new BrowserFrameWin(browser_frame, browser_view); | 574 return new BrowserFrameWin(browser_frame, browser_view); |
| 575 } | 575 } |
| OLD | NEW |