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

Side by Side Diff: ui/app_list/views/app_list_view.cc

Issue 2716213002: ui: Fix cc/paint skia type mismatches (Closed)
Patch Set: Created 3 years, 9 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
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 #include "ui/app_list/views/app_list_view.h" 5 #include "ui/app_list/views/app_list_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 : corner_radius_(corner_radius) { 88 : corner_radius_(corner_radius) {
89 SetPaintToLayer(); 89 SetPaintToLayer();
90 SetVisible(false); 90 SetVisible(false);
91 layer()->SetOpacity(0.0f); 91 layer()->SetOpacity(0.0f);
92 } 92 }
93 93
94 ~AppListOverlayView() override {} 94 ~AppListOverlayView() override {}
95 95
96 // Overridden from views::View: 96 // Overridden from views::View:
97 void OnPaint(gfx::Canvas* canvas) override { 97 void OnPaint(gfx::Canvas* canvas) override {
98 SkPaint paint; 98 cc::PaintFlags flags;
99 paint.setStyle(SkPaint::kFill_Style); 99 flags.setStyle(cc::PaintFlags::kFill_Style);
100 paint.setColor(SK_ColorWHITE); 100 flags.setColor(SK_ColorWHITE);
101 canvas->DrawRoundRect(GetContentsBounds(), corner_radius_, paint); 101 canvas->DrawRoundRect(GetContentsBounds(), corner_radius_, flags);
102 } 102 }
103 103
104 private: 104 private:
105 const int corner_radius_; 105 const int corner_radius_;
106 106
107 DISALLOW_COPY_AND_ASSIGN(AppListOverlayView); 107 DISALLOW_COPY_AND_ASSIGN(AppListOverlayView);
108 }; 108 };
109 109
110 // An event targeter for the search box widget which will ignore events that 110 // An event targeter for the search box widget which will ignore events that
111 // are on the search box's shadow. 111 // are on the search box's shadow.
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 app_list_main_view_->SetVisible(true); 595 app_list_main_view_->SetVisible(true);
596 // Refocus the search box. However, if the app list widget does not have 596 // Refocus the search box. However, if the app list widget does not have
597 // focus, it means another window has already taken focus, and we *must not* 597 // focus, it means another window has already taken focus, and we *must not*
598 // focus the search box (or we would steal focus back into the app list). 598 // focus the search box (or we would steal focus back into the app list).
599 if (GetWidget()->IsActive()) 599 if (GetWidget()->IsActive())
600 search_box_view_->search_box()->RequestFocus(); 600 search_box_view_->search_box()->RequestFocus();
601 } 601 }
602 } 602 }
603 603
604 } // namespace app_list 604 } // namespace app_list
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698