Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(116)

Side by Side Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 10872003: Ensure that the window switcher in Chrome metro mode on Windows 8 works with themes. Currently it i… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_view.h" 5 #include "chrome/browser/ui/views/frame/browser_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 } 525 }
526 526
527 gfx::ImageSkia BrowserView::GetOTRAvatarIcon() const { 527 gfx::ImageSkia BrowserView::GetOTRAvatarIcon() const {
528 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 528 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
529 const gfx::ImageSkia* otr_avatar = 529 const gfx::ImageSkia* otr_avatar =
530 rb.GetNativeImageNamed(GetOTRIconResourceID()).ToImageSkia(); 530 rb.GetNativeImageNamed(GetOTRIconResourceID()).ToImageSkia();
531 return *otr_avatar; 531 return *otr_avatar;
532 } 532 }
533 533
534 bool BrowserView::IsPositionInWindowCaption(const gfx::Point& point) { 534 bool BrowserView::IsPositionInWindowCaption(const gfx::Point& point) {
535 if (window_switcher_button_) {
536 gfx::Point window_switcher_point(point);
537 views::View::ConvertPointToTarget(this, window_switcher_button_,
538 &window_switcher_point);
539 if (window_switcher_button_->HitTestPoint(window_switcher_point))
540 return false;
541 }
535 return GetBrowserViewLayout()->IsPositionInWindowCaption(point); 542 return GetBrowserViewLayout()->IsPositionInWindowCaption(point);
536 } 543 }
537 544
538 /////////////////////////////////////////////////////////////////////////////// 545 ///////////////////////////////////////////////////////////////////////////////
539 // BrowserView, BrowserWindow implementation: 546 // BrowserView, BrowserWindow implementation:
540 547
541 void BrowserView::Show() { 548 void BrowserView::Show() {
542 // If the window is already visible, just activate it. 549 // If the window is already visible, just activate it.
543 if (frame_->IsVisible()) { 550 if (frame_->IsVisible()) {
544 frame_->Activate(); 551 frame_->Activate();
(...skipping 2061 matching lines...) Expand 10 before | Expand all | Expand 10 after
2606 2613
2607 Browser* modal_browser = 2614 Browser* modal_browser =
2608 browser::FindBrowserWithWebContents(active_dialog->web_contents()); 2615 browser::FindBrowserWithWebContents(active_dialog->web_contents());
2609 if (modal_browser && (browser_ != modal_browser)) { 2616 if (modal_browser && (browser_ != modal_browser)) {
2610 modal_browser->window()->FlashFrame(true); 2617 modal_browser->window()->FlashFrame(true);
2611 modal_browser->window()->Activate(); 2618 modal_browser->window()->Activate();
2612 } 2619 }
2613 2620
2614 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); 2621 AppModalDialogQueue::GetInstance()->ActivateModalDialog();
2615 } 2622 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698