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

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

Issue 2523673004: [NOT FOR COMMIT] Fully replace SkCanvas uses.
Patch Set: Support Android build. Created 4 years 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/command_line.h" 10 #include "base/command_line.h"
(...skipping 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after
1157 } 1157 }
1158 1158
1159 void LocationBarView::OnFocus() { 1159 void LocationBarView::OnFocus() {
1160 omnibox_view_->SetFocus(); 1160 omnibox_view_->SetFocus();
1161 } 1161 }
1162 1162
1163 void LocationBarView::OnPaint(gfx::Canvas* canvas) { 1163 void LocationBarView::OnPaint(gfx::Canvas* canvas) {
1164 View::OnPaint(canvas); 1164 View::OnPaint(canvas);
1165 1165
1166 if (show_focus_rect_ && omnibox_view_->HasFocus()) { 1166 if (show_focus_rect_ && omnibox_view_->HasFocus()) {
1167 SkPaint paint; 1167 CdlPaint paint;
1168 paint.setAntiAlias(true); 1168 paint.setAntiAlias(true);
1169 paint.setColor(GetNativeTheme()->GetSystemColor( 1169 paint.setColor(GetNativeTheme()->GetSystemColor(
1170 ui::NativeTheme::NativeTheme::kColorId_FocusedBorderColor)); 1170 ui::NativeTheme::NativeTheme::kColorId_FocusedBorderColor));
1171 paint.setStyle(SkPaint::kStroke_Style); 1171 paint.setStyle(CdlPaint::kStroke_Style);
1172 paint.setStrokeWidth(1); 1172 paint.setStrokeWidth(1);
1173 gfx::RectF focus_rect(GetLocalBounds()); 1173 gfx::RectF focus_rect(GetLocalBounds());
1174 focus_rect.Inset(gfx::InsetsF(0.5f)); 1174 focus_rect.Inset(gfx::InsetsF(0.5f));
1175 canvas->DrawRoundRect(focus_rect, 1175 canvas->DrawRoundRect(focus_rect,
1176 BackgroundWith1PxBorder::kCornerRadius + 0.5f, paint); 1176 BackgroundWith1PxBorder::kCornerRadius + 0.5f, paint);
1177 } 1177 }
1178 if (!is_popup_mode_) 1178 if (!is_popup_mode_)
1179 return; // The background and border are painted by our Background. 1179 return; // The background and border are painted by our Background.
1180 1180
1181 // Fill the location bar background color behind the border. Parts of the 1181 // Fill the location bar background color behind the border. Parts of the
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
1261 // LocationBarView, private TemplateURLServiceObserver implementation: 1261 // LocationBarView, private TemplateURLServiceObserver implementation:
1262 1262
1263 void LocationBarView::OnTemplateURLServiceChanged() { 1263 void LocationBarView::OnTemplateURLServiceChanged() {
1264 template_url_service_->RemoveObserver(this); 1264 template_url_service_->RemoveObserver(this);
1265 template_url_service_ = nullptr; 1265 template_url_service_ = nullptr;
1266 // If the browser is no longer active, let's not show the info bubble, as this 1266 // If the browser is no longer active, let's not show the info bubble, as this
1267 // would make the browser the active window again. 1267 // would make the browser the active window again.
1268 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive()) 1268 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive())
1269 ShowFirstRunBubble(); 1269 ShowFirstRunBubble();
1270 } 1270 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698