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

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

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

Powered by Google App Engine
This is Rietveld 408576698