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

Side by Side Diff: chrome/browser/ui/views/ash/browser_non_client_frame_view_ash.h

Issue 10082029: Ash: Fix hit testing for the bottom pixels of tabs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/ash/browser_non_client_frame_view_ash.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef CHROME_BROWSER_UI_VIEWS_ASH_BROWSER_NON_CLIENT_FRAME_VIEW_ASH_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_ASH_BROWSER_NON_CLIENT_FRAME_VIEW_ASH_H_
6 #define CHROME_BROWSER_UI_VIEWS_ASH_BROWSER_NON_CLIENT_FRAME_VIEW_ASH_H_ 6 #define CHROME_BROWSER_UI_VIEWS_ASH_BROWSER_NON_CLIENT_FRAME_VIEW_ASH_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h" 10 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h"
11 #include "chrome/browser/ui/views/tab_icon_view.h" 11 #include "chrome/browser/ui/views/tab_icon_view.h"
12 #include "ui/views/controls/button/button.h" // ButtonListener 12 #include "ui/views/controls/button/button.h" // ButtonListener
13 13
14 namespace ash { 14 namespace ash {
15 class FramePainter; 15 class FramePainter;
16 } 16 }
17 namespace views { 17 namespace views {
18 class ImageButton; 18 class ImageButton;
19 } 19 }
20 20
21 class BrowserNonClientFrameViewAsh : public BrowserNonClientFrameView, 21 class BrowserNonClientFrameViewAsh : public BrowserNonClientFrameView,
22 public views::ButtonListener, 22 public views::ButtonListener,
23 public TabIconView::TabIconViewModel { 23 public TabIconView::TabIconViewModel {
24 public: 24 public:
25 static const char kViewClassName[];
26
25 BrowserNonClientFrameViewAsh(BrowserFrame* frame, BrowserView* browser_view); 27 BrowserNonClientFrameViewAsh(BrowserFrame* frame, BrowserView* browser_view);
26 virtual ~BrowserNonClientFrameViewAsh(); 28 virtual ~BrowserNonClientFrameViewAsh();
27 29
28 void Init(); 30 void Init();
29 31
30 // BrowserNonClientFrameView overrides: 32 // BrowserNonClientFrameView overrides:
31 virtual gfx::Rect GetBoundsForTabStrip(views::View* tabstrip) const OVERRIDE; 33 virtual gfx::Rect GetBoundsForTabStrip(views::View* tabstrip) const OVERRIDE;
32 virtual int GetHorizontalTabStripVerticalOffset( 34 virtual int GetHorizontalTabStripVerticalOffset(
33 bool force_restored) const OVERRIDE; 35 bool force_restored) const OVERRIDE;
34 virtual void UpdateThrobber(bool running) OVERRIDE; 36 virtual void UpdateThrobber(bool running) OVERRIDE;
35 37
36 // views::NonClientFrameView overrides: 38 // views::NonClientFrameView overrides:
37 virtual gfx::Rect GetBoundsForClientView() const OVERRIDE; 39 virtual gfx::Rect GetBoundsForClientView() const OVERRIDE;
38 virtual gfx::Rect GetWindowBoundsForClientBounds( 40 virtual gfx::Rect GetWindowBoundsForClientBounds(
39 const gfx::Rect& client_bounds) const OVERRIDE; 41 const gfx::Rect& client_bounds) const OVERRIDE;
40 virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE; 42 virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE;
41 virtual void GetWindowMask(const gfx::Size& size, 43 virtual void GetWindowMask(const gfx::Size& size,
42 gfx::Path* window_mask) OVERRIDE; 44 gfx::Path* window_mask) OVERRIDE;
43 virtual void ResetWindowControls() OVERRIDE; 45 virtual void ResetWindowControls() OVERRIDE;
44 virtual void UpdateWindowIcon() OVERRIDE; 46 virtual void UpdateWindowIcon() OVERRIDE;
45 47
46 // views::View overrides: 48 // views::View overrides:
47 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; 49 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
48 virtual void Layout() OVERRIDE; 50 virtual void Layout() OVERRIDE;
51 virtual std::string GetClassName() const OVERRIDE;
49 virtual bool HitTest(const gfx::Point& l) const OVERRIDE; 52 virtual bool HitTest(const gfx::Point& l) const OVERRIDE;
50 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; 53 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
51 virtual gfx::Size GetMinimumSize() OVERRIDE; 54 virtual gfx::Size GetMinimumSize() OVERRIDE;
52 55
53 // views::ButtonListener overrides: 56 // views::ButtonListener overrides:
54 virtual void ButtonPressed(views::Button* sender, 57 virtual void ButtonPressed(views::Button* sender,
55 const views::Event& event) OVERRIDE; 58 const views::Event& event) OVERRIDE;
56 59
57 // Overridden from TabIconView::TabIconViewModel: 60 // Overridden from TabIconView::TabIconViewModel:
58 virtual bool ShouldTabIconViewAnimate() const OVERRIDE; 61 virtual bool ShouldTabIconViewAnimate() const OVERRIDE;
(...skipping 30 matching lines...) Expand all
89 scoped_ptr<ash::FramePainter> frame_painter_; 92 scoped_ptr<ash::FramePainter> frame_painter_;
90 93
91 // If true the |size_button_| minimizes, otherwise it toggles between 94 // If true the |size_button_| minimizes, otherwise it toggles between
92 // maximized and restored. 95 // maximized and restored.
93 bool size_button_minimizes_; 96 bool size_button_minimizes_;
94 97
95 DISALLOW_COPY_AND_ASSIGN(BrowserNonClientFrameViewAsh); 98 DISALLOW_COPY_AND_ASSIGN(BrowserNonClientFrameViewAsh);
96 }; 99 };
97 100
98 #endif // CHROME_BROWSER_UI_VIEWS_ASH_BROWSER_NON_CLIENT_FRAME_VIEW_ASH_H_ 101 #endif // CHROME_BROWSER_UI_VIEWS_ASH_BROWSER_NON_CLIENT_FRAME_VIEW_ASH_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/ash/browser_non_client_frame_view_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698