OLD | NEW |
| (Empty) |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "chrome/browser/ui/touch/frame/touch_browser_frame_view.h" | |
6 | |
7 #include "ui/gfx/compositor/layer.h" | |
8 #include "views/controls/button/image_button.h" | |
9 | |
10 // static | |
11 const char TouchBrowserFrameView::kViewClassName[] = | |
12 "browser/ui/touch/frame/TouchBrowserFrameView"; | |
13 | |
14 /////////////////////////////////////////////////////////////////////////////// | |
15 // TouchBrowserFrameView, public: | |
16 | |
17 TouchBrowserFrameView::TouchBrowserFrameView(BrowserFrame* frame, | |
18 BrowserView* browser_view) | |
19 : OpaqueBrowserFrameView(frame, browser_view), | |
20 initialized_screen_rotation_(false) { | |
21 } | |
22 | |
23 TouchBrowserFrameView::~TouchBrowserFrameView() { | |
24 } | |
25 | |
26 std::string TouchBrowserFrameView::GetClassName() const { | |
27 return kViewClassName; | |
28 } | |
29 | |
30 bool TouchBrowserFrameView::HitTest(const gfx::Point& point) const { | |
31 if (OpaqueBrowserFrameView::HitTest(point)) | |
32 return true; | |
33 | |
34 if (close_button()->IsVisible() && | |
35 close_button()->GetMirroredBounds().Contains(point)) | |
36 return true; | |
37 if (restore_button()->IsVisible() && | |
38 restore_button()->GetMirroredBounds().Contains(point)) | |
39 return true; | |
40 if (maximize_button()->IsVisible() && | |
41 maximize_button()->GetMirroredBounds().Contains(point)) | |
42 return true; | |
43 if (minimize_button()->IsVisible() && | |
44 minimize_button()->GetMirroredBounds().Contains(point)) | |
45 return true; | |
46 | |
47 return false; | |
48 } | |
OLD | NEW |