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

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

Issue 10388032: Move app list from ash to ui. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: fix win_aura bot and comments in #5 Created 8 years, 7 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 | « ash/app_list/app_list.cc ('k') | ash/app_list/app_list_bubble_border.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef ASH_APP_LIST_APP_LIST_BUBBLE_BORDER_H_
6 #define ASH_APP_LIST_APP_LIST_BUBBLE_BORDER_H_
7 #pragma once
8
9 #include "base/basictypes.h"
10 #include "ui/views/bubble/bubble_border.h"
11
12 namespace ash {
13
14 // A class to paint bubble border and background.
15 class AppListBubbleBorder : public views::BubbleBorder {
16 public:
17 explicit AppListBubbleBorder(views::View* app_list_view);
18 virtual ~AppListBubbleBorder();
19
20 int arrow_offset() const {
21 return arrow_offset_;
22 }
23 void set_arrow_offset(int arrow_offset) {
24 arrow_offset_ = arrow_offset;
25 }
26
27 private:
28 void PaintModelViewBackground(gfx::Canvas* canvas,
29 const gfx::Rect& bounds) const;
30 void PaintPageSwitcherBackground(gfx::Canvas* canvas,
31 const gfx::Rect& bounds) const;
32
33 // views::BubbleBorder overrides:
34 virtual void GetInsets(gfx::Insets* insets) const OVERRIDE;
35 virtual gfx::Rect GetBounds(const gfx::Rect& position_relative_to,
36 const gfx::Size& contents_size) const OVERRIDE;
37
38 // views::Border overrides:
39 virtual void Paint(const views::View& view,
40 gfx::Canvas* canvas) const OVERRIDE;
41
42 // AppListView hosted inside this bubble.
43 views::View* app_list_view_;
44
45 // Offset in pixels relative the default middle position.
46 int arrow_offset_;
47
48 DISALLOW_COPY_AND_ASSIGN(AppListBubbleBorder);
49 };
50
51 } // namespace ash
52
53 #endif // ASH_APP_LIST_APP_LIST_BUBBLE_BORDER_H_
OLDNEW
« no previous file with comments | « ash/app_list/app_list.cc ('k') | ash/app_list/app_list_bubble_border.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698