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_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 Loading... |
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 Loading... |
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 } |
OLD | NEW |