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

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

Issue 10827198: Change View::HitTest to View::HitTestRect (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed errors reported by trybots 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
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_layout.h" 5 #include "chrome/browser/ui/views/frame/browser_view_layout.h"
6 6
7 #include "chrome/browser/ui/find_bar/find_bar.h" 7 #include "chrome/browser/ui/find_bar/find_bar.h"
8 #include "chrome/browser/ui/find_bar/find_bar_controller.h" 8 #include "chrome/browser/ui/find_bar/find_bar_controller.h"
9 #include "chrome/browser/ui/view_ids.h" 9 #include "chrome/browser/ui/view_ids.h"
10 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h" 10 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h"
(...skipping 24 matching lines...) Expand all
35 const int kWindowSwitcherOffsetX = 7; 35 const int kWindowSwitcherOffsetX = 7;
36 36
37 // Combines View::ConvertPointToView and View::HitTest for a given |point|. 37 // Combines View::ConvertPointToView and View::HitTest for a given |point|.
38 // Converts |point| from |src| to |dst| and hit tests it against |dst|. The 38 // Converts |point| from |src| to |dst| and hit tests it against |dst|. The
39 // converted |point| can then be retrieved and used for additional tests. 39 // converted |point| can then be retrieved and used for additional tests.
40 bool ConvertedHitTest(views::View* src, views::View* dst, gfx::Point* point) { 40 bool ConvertedHitTest(views::View* src, views::View* dst, gfx::Point* point) {
41 DCHECK(src); 41 DCHECK(src);
42 DCHECK(dst); 42 DCHECK(dst);
43 DCHECK(point); 43 DCHECK(point);
44 views::View::ConvertPointToView(src, dst, point); 44 views::View::ConvertPointToView(src, dst, point);
45 return dst->HitTest(*point); 45 return dst->HitTestPoint(*point);
46 } 46 }
47 47
48 } // namespace 48 } // namespace
49 49
50 //////////////////////////////////////////////////////////////////////////////// 50 ////////////////////////////////////////////////////////////////////////////////
51 // BrowserViewLayout, public: 51 // BrowserViewLayout, public:
52 52
53 BrowserViewLayout::BrowserViewLayout() 53 BrowserViewLayout::BrowserViewLayout()
54 : tabstrip_(NULL), 54 : tabstrip_(NULL),
55 toolbar_(NULL), 55 toolbar_(NULL),
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 bottom -= height; 478 bottom -= height;
479 } 479 }
480 return bottom; 480 return bottom;
481 } 481 }
482 482
483 bool BrowserViewLayout::InfobarVisible() const { 483 bool BrowserViewLayout::InfobarVisible() const {
484 // NOTE: Can't check if the size IsEmpty() since it's always 0-width. 484 // NOTE: Can't check if the size IsEmpty() since it's always 0-width.
485 return browser()->SupportsWindowFeature(Browser::FEATURE_INFOBAR) && 485 return browser()->SupportsWindowFeature(Browser::FEATURE_INFOBAR) &&
486 (infobar_container_->GetPreferredSize().height() != 0); 486 (infobar_container_->GetPreferredSize().height() != 0);
487 } 487 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/content_setting_bubble_contents.cc ('k') | chrome/browser/ui/views/frame/glass_browser_frame_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698