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 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 } | 370 } |
371 | 371 |
372 bool BrowserFrameWin::UsesNativeSystemMenu() const { | 372 bool BrowserFrameWin::UsesNativeSystemMenu() const { |
373 return true; | 373 return true; |
374 } | 374 } |
375 | 375 |
376 int BrowserFrameWin::GetMinimizeButtonOffset() const { | 376 int BrowserFrameWin::GetMinimizeButtonOffset() const { |
377 return minimize_button_metrics_.GetMinimizeButtonOffsetX(); | 377 return minimize_button_metrics_.GetMinimizeButtonOffsetX(); |
378 } | 378 } |
379 | 379 |
380 void BrowserFrameWin::TabStripDisplayModeChanged() { | |
381 UpdateDWMFrame(); | |
382 } | |
383 | |
384 void BrowserFrameWin::ButtonPressed(views::Button* sender, | 380 void BrowserFrameWin::ButtonPressed(views::Button* sender, |
385 const ui::Event& event) { | 381 const ui::Event& event) { |
386 HMODULE metro = base::win::GetMetroModule(); | 382 HMODULE metro = base::win::GetMetroModule(); |
387 if (!metro) | 383 if (!metro) |
388 return; | 384 return; |
389 | 385 |
390 // Toggle the profile and switch to the corresponding browser window in the | 386 // Toggle the profile and switch to the corresponding browser window in the |
391 // profile. The GetOffTheRecordProfile function is documented to create an | 387 // profile. The GetOffTheRecordProfile function is documented to create an |
392 // incognito profile if one does not exist. That is not a concern as the | 388 // incognito profile if one does not exist. That is not a concern as the |
393 // windows 8 window switcher button shows up on the caption only when a | 389 // windows 8 window switcher button shows up on the caption only when a |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
520 //////////////////////////////////////////////////////////////////////////////// | 516 //////////////////////////////////////////////////////////////////////////////// |
521 // BrowserFrame, public: | 517 // BrowserFrame, public: |
522 | 518 |
523 bool BrowserFrame::ShouldLeaveOffsetNearTopBorder() { | 519 bool BrowserFrame::ShouldLeaveOffsetNearTopBorder() { |
524 if (win8::IsSingleWindowMetroMode()) { | 520 if (win8::IsSingleWindowMetroMode()) { |
525 if (ui::GetDisplayLayout() == ui::LAYOUT_DESKTOP) | 521 if (ui::GetDisplayLayout() == ui::LAYOUT_DESKTOP) |
526 return false; | 522 return false; |
527 } | 523 } |
528 return !IsMaximized(); | 524 return !IsMaximized(); |
529 } | 525 } |
OLD | NEW |