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

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

Issue 2070733002: Update omnibox dropdown selection/hover background drawing for MD. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scaled_radius
Patch Set: Use BackgroundWith1PxBorder to do the drawing Created 4 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 gfx::Point* top_left_screen_coord, 470 gfx::Point* top_left_screen_coord,
471 int* popup_width, 471 int* popup_width,
472 int* left_margin, 472 int* left_margin,
473 int* right_margin, 473 int* right_margin,
474 int top_edge_overlap) { 474 int top_edge_overlap) {
475 *top_left_screen_coord = gfx::Point(0, parent()->height() - top_edge_overlap); 475 *top_left_screen_coord = gfx::Point(0, parent()->height() - top_edge_overlap);
476 views::View::ConvertPointToScreen(parent(), top_left_screen_coord); 476 views::View::ConvertPointToScreen(parent(), top_left_screen_coord);
477 477
478 *popup_width = parent()->width(); 478 *popup_width = parent()->width();
479 gfx::Rect location_bar_bounds(bounds()); 479 gfx::Rect location_bar_bounds(bounds());
480 location_bar_bounds.Inset(GetHorizontalEdgeThickness(), 0); 480 if (!ui::MaterialDesignController::IsModeMaterial())
481 location_bar_bounds.Inset(GetHorizontalEdgeThickness(), 0);
481 *left_margin = location_bar_bounds.x(); 482 *left_margin = location_bar_bounds.x();
482 *right_margin = *popup_width - location_bar_bounds.right(); 483 *right_margin = *popup_width - location_bar_bounds.right();
483 } 484 }
484 485
485 //////////////////////////////////////////////////////////////////////////////// 486 ////////////////////////////////////////////////////////////////////////////////
486 // LocationBarView, public LocationBar implementation: 487 // LocationBarView, public LocationBar implementation:
487 488
488 void LocationBarView::FocusLocation(bool select_all) { 489 void LocationBarView::FocusLocation(bool select_all) {
489 omnibox_view_->SetFocus(); 490 omnibox_view_->SetFocus();
490 if (select_all) 491 if (select_all)
(...skipping 893 matching lines...) Expand 10 before | Expand all | Expand 10 after
1384 // LocationBarView, private TemplateURLServiceObserver implementation: 1385 // LocationBarView, private TemplateURLServiceObserver implementation:
1385 1386
1386 void LocationBarView::OnTemplateURLServiceChanged() { 1387 void LocationBarView::OnTemplateURLServiceChanged() {
1387 template_url_service_->RemoveObserver(this); 1388 template_url_service_->RemoveObserver(this);
1388 template_url_service_ = nullptr; 1389 template_url_service_ = nullptr;
1389 // If the browser is no longer active, let's not show the info bubble, as this 1390 // If the browser is no longer active, let's not show the info bubble, as this
1390 // would make the browser the active window again. 1391 // would make the browser the active window again.
1391 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive()) 1392 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive())
1392 ShowFirstRunBubble(); 1393 ShowFirstRunBubble();
1393 } 1394 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698