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

Unified Diff: ash/app_list/app_list_bubble_border.h

Issue 10381018: ash: First pass of Applist v2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/app_list/app_list_bubble_border.h
diff --git a/ash/app_list/app_list_bubble_border.h b/ash/app_list/app_list_bubble_border.h
new file mode 100644
index 0000000000000000000000000000000000000000..345e4eb4513228f7911cac796d80177fb19853d0
--- /dev/null
+++ b/ash/app_list/app_list_bubble_border.h
@@ -0,0 +1,53 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ASH_APP_LIST_APP_LIST_BUBBLE_BORDER_H_
+#define ASH_APP_LIST_APP_LIST_BUBBLE_BORDER_H_
+#pragma once
+
+#include "base/basictypes.h"
+#include "ui/views/bubble/bubble_border.h"
+
+namespace ash {
+
+// A class to paint bubble border and background.
+class AppListBubbleBorder : public views::BubbleBorder {
+ public:
+ explicit AppListBubbleBorder(views::View* app_list_view);
+ virtual ~AppListBubbleBorder();
+
+ int arrow_offset() const {
+ return arrow_offset_;
+ }
+ void set_arrow_offset(int arrow_offset) {
+ arrow_offset_ = arrow_offset;
+ }
+
+ private:
+ void PaintModelViewBackground(gfx::Canvas* canvas,
+ const gfx::Rect& bounds) const;
+ void PaintPageSwitcherBackground(gfx::Canvas* canvas,
+ const gfx::Rect& bounds) const;
+
+ // views::BubbleBorder overrides:
+ virtual void GetInsets(gfx::Insets* insets) const OVERRIDE;
+ virtual gfx::Rect GetBounds(const gfx::Rect& position_relative_to,
+ const gfx::Size& contents_size) const OVERRIDE;
+
+ // views::Border overrides:
+ virtual void Paint(const views::View& view,
+ gfx::Canvas* canvas) const OVERRIDE;
+
+ // AppListView hosted inside this bubble.
+ views::View* app_list_view_;
+
+ // Offset in pixels relative the default middle position.
+ int arrow_offset_;
+
+ DISALLOW_COPY_AND_ASSIGN(AppListBubbleBorder);
+};
+
+} // namespace ash
+
+#endif // ASH_APP_LIST_APP_LIST_BUBBLE_BORDER_H_
« 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