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 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
331 case SELECTED_TEXT: | 331 case SELECTED_TEXT: |
332 return native_theme->GetSystemColor( | 332 return native_theme->GetSystemColor( |
333 ui::NativeTheme::kColorId_TextfieldSelectionColor); | 333 ui::NativeTheme::kColorId_TextfieldSelectionColor); |
334 | 334 |
335 case DEEMPHASIZED_TEXT: | 335 case DEEMPHASIZED_TEXT: |
336 return color_utils::AlphaBlend(GetColor(TEXT), GetColor(BACKGROUND), 128); | 336 return color_utils::AlphaBlend(GetColor(TEXT), GetColor(BACKGROUND), 128); |
337 | 337 |
338 case EV_BUBBLE_TEXT_AND_BORDER: | 338 case EV_BUBBLE_TEXT_AND_BORDER: |
339 return ui::MaterialDesignController::IsModeMaterial() | 339 return ui::MaterialDesignController::IsModeMaterial() |
340 ? GetSecureTextColor( | 340 ? GetSecureTextColor( |
341 GetToolbarModel()->GetSecurityLevel(false)) | 341 security_state::SecurityStateModel::EV_SECURE) |
342 : SkColorSetRGB(7, 149, 0); | 342 : SkColorSetRGB(7, 149, 0); |
343 } | 343 } |
344 NOTREACHED(); | 344 NOTREACHED(); |
345 return gfx::kPlaceholderColor; | 345 return gfx::kPlaceholderColor; |
346 } | 346 } |
347 | 347 |
348 SkColor LocationBarView::GetSecureTextColor( | 348 SkColor LocationBarView::GetSecureTextColor( |
349 security_state::SecurityStateModel::SecurityLevel security_level) const { | 349 security_state::SecurityStateModel::SecurityLevel security_level) const { |
350 if (security_level == | 350 if (security_level == |
351 security_state::SecurityStateModel::SECURITY_POLICY_WARNING) { | 351 security_state::SecurityStateModel::SECURITY_POLICY_WARNING) { |
(...skipping 1037 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 |