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

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

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

Powered by Google App Engine
This is Rietveld 408576698