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

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

Issue 19115003: Make the maximize button more easily hittable when there is a huge amount of tabs present (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 590 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 } 601 }
602 602
603 WebContents* BrowserView::GetActiveWebContents() const { 603 WebContents* BrowserView::GetActiveWebContents() const {
604 return browser_->tab_strip_model()->GetActiveWebContents(); 604 return browser_->tab_strip_model()->GetActiveWebContents();
605 } 605 }
606 606
607 gfx::ImageSkia BrowserView::GetOTRAvatarIcon() const { 607 gfx::ImageSkia BrowserView::GetOTRAvatarIcon() const {
608 return *GetThemeProvider()->GetImageSkiaNamed(GetOTRIconResourceID()); 608 return *GetThemeProvider()->GetImageSkiaNamed(GetOTRIconResourceID());
609 } 609 }
610 610
611 bool BrowserView::IsPositionInWindowCaption(const gfx::Point& point) {
612 if (window_switcher_button_) {
613 gfx::Point window_switcher_point(point);
614 views::View::ConvertPointToTarget(this, window_switcher_button_,
615 &window_switcher_point);
616 if (window_switcher_button_->HitTestPoint(window_switcher_point))
617 return false;
618 }
619 return GetBrowserViewLayout()->IsPositionInWindowCaption(point);
620 }
621
622 /////////////////////////////////////////////////////////////////////////////// 611 ///////////////////////////////////////////////////////////////////////////////
623 // BrowserView, BrowserWindow implementation: 612 // BrowserView, BrowserWindow implementation:
624 613
625 void BrowserView::Show() { 614 void BrowserView::Show() {
626 // If the window is already visible, just activate it. 615 // If the window is already visible, just activate it.
627 if (frame_->IsVisible()) { 616 if (frame_->IsVisible()) {
628 frame_->Activate(); 617 frame_->Activate();
629 return; 618 return;
630 } 619 }
631 620
(...skipping 2037 matching lines...) Expand 10 before | Expand all | Expand 10 after
2669 // The +1 in the next line creates a 1-px gap between icon and arrow tip. 2658 // The +1 in the next line creates a 1-px gap between icon and arrow tip.
2670 gfx::Point icon_bottom(0, location_icon_view->GetImageBounds().bottom() - 2659 gfx::Point icon_bottom(0, location_icon_view->GetImageBounds().bottom() -
2671 LocationBarView::kIconInternalPadding + 1); 2660 LocationBarView::kIconInternalPadding + 1);
2672 ConvertPointToTarget(location_icon_view, this, &icon_bottom); 2661 ConvertPointToTarget(location_icon_view, this, &icon_bottom);
2673 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL)); 2662 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL));
2674 ConvertPointToTarget(infobar_container_, this, &infobar_top); 2663 ConvertPointToTarget(infobar_container_, this, &infobar_top);
2675 top_arrow_height = infobar_top.y() - icon_bottom.y(); 2664 top_arrow_height = infobar_top.y() - icon_bottom.y();
2676 } 2665 }
2677 return top_arrow_height; 2666 return top_arrow_height;
2678 } 2667 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.h ('k') | chrome/browser/ui/views/frame/browser_view_layout.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698