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

Unified Diff: ui/app_list/app_list_view.cc

Issue 10900018: Introduce App Launcher for Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase gyp file for ui extraction Created 8 years, 3 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 | « ui/app_list/app_list_view.h ('k') | ui/app_list/app_list_view_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/app_list_view.cc
diff --git a/ui/app_list/app_list_view.cc b/ui/app_list/app_list_view.cc
index 769c4597663d20cd578fc9353a90a39af2ab3dd8..0cbd42b15bcf71abec24943130d7315614c55b95 100644
--- a/ui/app_list/app_list_view.cc
+++ b/ui/app_list/app_list_view.cc
@@ -6,6 +6,7 @@
#include "base/string_util.h"
#include "ui/app_list/app_list_bubble_border.h"
+#include "ui/app_list/app_list_constants.h"
#include "ui/app_list/app_list_item_view.h"
#include "ui/app_list/app_list_model.h"
#include "ui/app_list/app_list_view_delegate.h"
@@ -51,8 +52,14 @@ void AppListView::InitAsBubble(
gfx::NativeView parent,
PaginationModel* pagination_model,
views::View* anchor,
+ const gfx::Point& anchor_point,
views::BubbleBorder::ArrowLocation arrow_location) {
+#if defined(OS_WIN)
+ set_background(views::Background::CreateSolidBackground(
+ kContentsBackgroundColor));
+#else
set_background(NULL);
+#endif
SetLayoutManager(new views::BoxLayout(views::BoxLayout::kVertical,
kInnerPadding,
@@ -68,6 +75,7 @@ void AppListView::InitAsBubble(
search_box_view_->set_contents_view(contents_view_);
set_anchor_view(anchor);
+ set_anchor_point(anchor_point);
set_margins(gfx::Insets());
set_move_with_anchor(true);
set_parent_window(parent);
@@ -81,12 +89,14 @@ void AppListView::InitAsBubble(
GetBubbleFrameView()->SetBubbleBorder(bubble_border_);
SetBubbleArrowLocation(arrow_location);
+#if !defined(OS_WIN)
// Resets default background since AppListBubbleBorder paints background.
GetBubbleFrameView()->set_background(NULL);
contents_view_->SetPaintToLayer(true);
contents_view_->SetFillsBoundsOpaquely(false);
contents_view_->layer()->SetMasksToBounds(true);
+#endif
CreateModel();
}
@@ -126,6 +136,13 @@ views::View* AppListView::GetInitiallyFocusedView() {
return search_box_view_->search_box();
}
+gfx::ImageSkia AppListView::GetWindowAppIcon() {
+ if (delegate_.get())
+ return delegate_->GetWindowAppIcon();
+
+ return gfx::ImageSkia();
+}
+
bool AppListView::HasHitTestMask() const {
return true;
}
« no previous file with comments | « ui/app_list/app_list_view.h ('k') | ui/app_list/app_list_view_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698