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

Side by Side Diff: chrome/browser/ui/touch/frame/touch_browser_frame_view.cc

Issue 8678015: Touch constants and dead code removal. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Applied Sadrul's comments Created 9 years, 1 month 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
(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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/touch/frame/touch_browser_frame_view.h ('k') | chrome/browser/ui/touch/tabs/tab_strip_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698