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

Side by Side Diff: ui/app_list/app_list_bubble_border.h

Issue 10566009: app_list: Fix shadow bleeds over launcher button and steals mouse events (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix aura_demo compilation Created 8 years, 6 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
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 UI_APP_LIST_APP_LIST_BUBBLE_BORDER_H_ 5 #ifndef UI_APP_LIST_APP_LIST_BUBBLE_BORDER_H_
6 #define UI_APP_LIST_APP_LIST_BUBBLE_BORDER_H_ 6 #define UI_APP_LIST_APP_LIST_BUBBLE_BORDER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "ui/gfx/shadow_value.h" 10 #include "ui/gfx/shadow_value.h"
11 #include "ui/views/bubble/bubble_border.h" 11 #include "ui/views/bubble/bubble_border.h"
12 12
13 namespace app_list { 13 namespace app_list {
14 14
15 // A class to paint bubble border and background. 15 // A class to paint bubble border and background.
16 class AppListBubbleBorder : public views::BubbleBorder { 16 class AppListBubbleBorder : public views::BubbleBorder {
17 public: 17 public:
18 AppListBubbleBorder(views::View* app_list_view, 18 AppListBubbleBorder(views::View* app_list_view,
19 views::View* search_box_view); 19 views::View* search_box_view);
20 virtual ~AppListBubbleBorder(); 20 virtual ~AppListBubbleBorder();
21 21
22 bool ArrowAtTopOrBottom() const; 22 bool ArrowAtTopOrBottom() const;
23 bool ArrowOnLeftOrRight() const; 23 bool ArrowOnLeftOrRight() const;
24 24
25 void GetMask(const gfx::Rect& bounds, gfx::Path* mask) const;
26
25 void set_offset(const gfx::Point& offset) { offset_ = offset; } 27 void set_offset(const gfx::Point& offset) { offset_ = offset; }
26 const gfx::Point& offset() const { return offset_; } 28 const gfx::Point& offset() const { return offset_; }
27 29
28 private: 30 private:
29 // Gets arrow offset based on arrow location and |offset_|. 31 // Gets arrow offset based on arrow location and |offset_|.
30 int GetArrowOffset() const; 32 int GetArrowOffset() const;
31 33
32 void PaintBackground(gfx::Canvas* canvas, 34 void PaintBackground(gfx::Canvas* canvas,
33 const gfx::Rect& bounds) const; 35 const gfx::Rect& bounds) const;
34 36
(...skipping 16 matching lines...) Expand all
51 gfx::Point offset_; 53 gfx::Point offset_;
52 54
53 gfx::ShadowValues shadows_; 55 gfx::ShadowValues shadows_;
54 56
55 DISALLOW_COPY_AND_ASSIGN(AppListBubbleBorder); 57 DISALLOW_COPY_AND_ASSIGN(AppListBubbleBorder);
56 }; 58 };
57 59
58 } // namespace app_list 60 } // namespace app_list
59 61
60 #endif // UI_APP_LIST_APP_LIST_BUBBLE_BORDER_H_ 62 #endif // UI_APP_LIST_APP_LIST_BUBBLE_BORDER_H_
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_view_aura.cc ('k') | ui/app_list/app_list_bubble_border.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698