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

Side by Side Diff: chrome/browser/ui/views/location_bar/location_bar_view.cc

Issue 2640983002: Rename paint data structures (Closed)
Patch Set: DrawingDisplayItem Created 3 years, 10 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 "chrome/browser/ui/views/location_bar/location_bar_view.h" 5 #include "chrome/browser/ui/views/location_bar/location_bar_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 9
10 #include "base/i18n/rtl.h" 10 #include "base/i18n/rtl.h"
(...skipping 1119 matching lines...) Expand 10 before | Expand all | Expand 10 after
1130 } 1130 }
1131 1131
1132 void LocationBarView::OnFocus() { 1132 void LocationBarView::OnFocus() {
1133 omnibox_view_->SetFocus(); 1133 omnibox_view_->SetFocus();
1134 } 1134 }
1135 1135
1136 void LocationBarView::OnPaint(gfx::Canvas* canvas) { 1136 void LocationBarView::OnPaint(gfx::Canvas* canvas) {
1137 View::OnPaint(canvas); 1137 View::OnPaint(canvas);
1138 1138
1139 if (show_focus_rect_ && omnibox_view_->HasFocus()) { 1139 if (show_focus_rect_ && omnibox_view_->HasFocus()) {
1140 SkPaint paint; 1140 cc::PaintFlags paint;
1141 paint.setAntiAlias(true); 1141 paint.setAntiAlias(true);
1142 paint.setColor(GetNativeTheme()->GetSystemColor( 1142 paint.setColor(GetNativeTheme()->GetSystemColor(
1143 ui::NativeTheme::NativeTheme::kColorId_FocusedBorderColor)); 1143 ui::NativeTheme::NativeTheme::kColorId_FocusedBorderColor));
1144 paint.setStyle(SkPaint::kStroke_Style); 1144 paint.setStyle(cc::PaintFlags::kStroke_Style);
1145 paint.setStrokeWidth(1); 1145 paint.setStrokeWidth(1);
1146 gfx::RectF focus_rect(GetLocalBounds()); 1146 gfx::RectF focus_rect(GetLocalBounds());
1147 focus_rect.Inset(gfx::InsetsF(0.5f)); 1147 focus_rect.Inset(gfx::InsetsF(0.5f));
1148 canvas->DrawRoundRect(focus_rect, 1148 canvas->DrawRoundRect(focus_rect,
1149 BackgroundWith1PxBorder::kCornerRadius + 0.5f, paint); 1149 BackgroundWith1PxBorder::kCornerRadius + 0.5f, paint);
1150 } 1150 }
1151 if (!is_popup_mode_) 1151 if (!is_popup_mode_)
1152 return; // The background and border are painted by our Background. 1152 return; // The background and border are painted by our Background.
1153 1153
1154 // Fill the location bar background color behind the border. Parts of the 1154 // Fill the location bar background color behind the border. Parts of the
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
1235 // LocationBarView, private TemplateURLServiceObserver implementation: 1235 // LocationBarView, private TemplateURLServiceObserver implementation:
1236 1236
1237 void LocationBarView::OnTemplateURLServiceChanged() { 1237 void LocationBarView::OnTemplateURLServiceChanged() {
1238 template_url_service_->RemoveObserver(this); 1238 template_url_service_->RemoveObserver(this);
1239 template_url_service_ = nullptr; 1239 template_url_service_ = nullptr;
1240 // If the browser is no longer active, let's not show the info bubble, as this 1240 // If the browser is no longer active, let's not show the info bubble, as this
1241 // would make the browser the active window again. 1241 // would make the browser the active window again.
1242 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive()) 1242 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive())
1243 ShowFirstRunBubble(); 1243 ShowFirstRunBubble();
1244 } 1244 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698