| OLD | NEW |
| 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 1253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1264 if (ui::MaterialDesignController::IsModeMaterial()) { | 1264 if (ui::MaterialDesignController::IsModeMaterial()) { |
| 1265 if (show_focus_rect_ && omnibox_view_->HasFocus()) { | 1265 if (show_focus_rect_ && omnibox_view_->HasFocus()) { |
| 1266 SkPaint paint; | 1266 SkPaint paint; |
| 1267 paint.setAntiAlias(true); | 1267 paint.setAntiAlias(true); |
| 1268 paint.setColor(GetNativeTheme()->GetSystemColor( | 1268 paint.setColor(GetNativeTheme()->GetSystemColor( |
| 1269 ui::NativeTheme::NativeTheme::kColorId_FocusedBorderColor)); | 1269 ui::NativeTheme::NativeTheme::kColorId_FocusedBorderColor)); |
| 1270 paint.setStyle(SkPaint::kStroke_Style); | 1270 paint.setStyle(SkPaint::kStroke_Style); |
| 1271 paint.setStrokeWidth(1); | 1271 paint.setStrokeWidth(1); |
| 1272 gfx::RectF focus_rect(GetLocalBounds()); | 1272 gfx::RectF focus_rect(GetLocalBounds()); |
| 1273 focus_rect.Inset(gfx::InsetsF(0.5f)); | 1273 focus_rect.Inset(gfx::InsetsF(0.5f)); |
| 1274 canvas->DrawRoundRect(focus_rect, BackgroundWith1PxBorder::kCornerRadius, | 1274 canvas->DrawRoundRect( |
| 1275 paint); | 1275 focus_rect, BackgroundWith1PxBorder::kCornerRadius + 0.5f, paint); |
| 1276 } | 1276 } |
| 1277 if (!is_popup_mode_) | 1277 if (!is_popup_mode_) |
| 1278 return; // The background and border are painted by our Background. | 1278 return; // The background and border are painted by our Background. |
| 1279 } | 1279 } |
| 1280 | 1280 |
| 1281 // Fill the location bar background color behind the border. Parts of the | 1281 // Fill the location bar background color behind the border. Parts of the |
| 1282 // border images are meant to rest atop the toolbar background and parts atop | 1282 // border images are meant to rest atop the toolbar background and parts atop |
| 1283 // the omnibox background, so we can't just blindly fill our entire bounds. | 1283 // the omnibox background, so we can't just blindly fill our entire bounds. |
| 1284 gfx::Rect bounds(GetContentsBounds()); | 1284 gfx::Rect bounds(GetContentsBounds()); |
| 1285 bounds.Inset(GetHorizontalEdgeThickness(), | 1285 bounds.Inset(GetHorizontalEdgeThickness(), |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1389 // LocationBarView, private TemplateURLServiceObserver implementation: | 1389 // LocationBarView, private TemplateURLServiceObserver implementation: |
| 1390 | 1390 |
| 1391 void LocationBarView::OnTemplateURLServiceChanged() { | 1391 void LocationBarView::OnTemplateURLServiceChanged() { |
| 1392 template_url_service_->RemoveObserver(this); | 1392 template_url_service_->RemoveObserver(this); |
| 1393 template_url_service_ = nullptr; | 1393 template_url_service_ = nullptr; |
| 1394 // If the browser is no longer active, let's not show the info bubble, as this | 1394 // If the browser is no longer active, let's not show the info bubble, as this |
| 1395 // would make the browser the active window again. | 1395 // would make the browser the active window again. |
| 1396 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive()) | 1396 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive()) |
| 1397 ShowFirstRunBubble(); | 1397 ShowFirstRunBubble(); |
| 1398 } | 1398 } |
| OLD | NEW |