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 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 BuildSystemMenuForAppOrPopupWindow(); | 311 BuildSystemMenuForAppOrPopupWindow(); |
312 system_menu_.reset( | 312 system_menu_.reset( |
313 new views::NativeMenuWin(system_menu_contents_.get(), GetNativeWindow())); | 313 new views::NativeMenuWin(system_menu_contents_.get(), GetNativeWindow())); |
314 system_menu_->Rebuild(); | 314 system_menu_->Rebuild(); |
315 } | 315 } |
316 | 316 |
317 int BrowserFrameWin::GetMinimizeButtonOffset() const { | 317 int BrowserFrameWin::GetMinimizeButtonOffset() const { |
318 int minimize_button_offset = | 318 int minimize_button_offset = |
319 GetMinimizeButtonOffsetForWindow(GetNativeView()); | 319 GetMinimizeButtonOffsetForWindow(GetNativeView()); |
320 | 320 |
321 if (minimize_button_offset) | 321 if (minimize_button_offset > 0) |
322 return minimize_button_offset; | 322 return minimize_button_offset; |
323 | 323 |
324 // If we fail to get the minimize button offset via the WM_GETTITLEBARINFOEX | 324 // If we fail to get the minimize button offset via the WM_GETTITLEBARINFOEX |
325 // message then calculate and return this via the | 325 // message then calculate and return this via the |
326 // cached_minimize_button_x_delta_ member value. Please see | 326 // cached_minimize_button_x_delta_ member value. Please see |
327 // CacheMinimizeButtonDelta() for more details. | 327 // CacheMinimizeButtonDelta() for more details. |
328 DCHECK(cached_minimize_button_x_delta_); | 328 DCHECK(cached_minimize_button_x_delta_); |
329 | 329 |
330 RECT client_rect = {0}; | 330 RECT client_rect = {0}; |
331 GetClientRect(&client_rect); | 331 GetClientRect(&client_rect); |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
585 | 585 |
586 //////////////////////////////////////////////////////////////////////////////// | 586 //////////////////////////////////////////////////////////////////////////////// |
587 // NativeBrowserFrame, public: | 587 // NativeBrowserFrame, public: |
588 | 588 |
589 // static | 589 // static |
590 NativeBrowserFrame* NativeBrowserFrame::CreateNativeBrowserFrame( | 590 NativeBrowserFrame* NativeBrowserFrame::CreateNativeBrowserFrame( |
591 BrowserFrame* browser_frame, | 591 BrowserFrame* browser_frame, |
592 BrowserView* browser_view) { | 592 BrowserView* browser_view) { |
593 return new BrowserFrameWin(browser_frame, browser_view); | 593 return new BrowserFrameWin(browser_frame, browser_view); |
594 } | 594 } |
OLD | NEW |