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

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

Issue 1472023004: Updated DropdownBarHost to use Layer clipping instead of OnPaint() clipping. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments from patch set 1. Created 5 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
« no previous file with comments | « chrome/browser/ui/views/location_bar/location_bar_view.h ('k') | no next file » | 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 zoom_view_(NULL), 137 zoom_view_(NULL),
138 open_pdf_in_reader_view_(NULL), 138 open_pdf_in_reader_view_(NULL),
139 manage_passwords_icon_view_(NULL), 139 manage_passwords_icon_view_(NULL),
140 save_credit_card_icon_view_(nullptr), 140 save_credit_card_icon_view_(nullptr),
141 translate_icon_view_(NULL), 141 translate_icon_view_(NULL),
142 star_view_(NULL), 142 star_view_(NULL),
143 size_animation_(this), 143 size_animation_(this),
144 is_popup_mode_(is_popup_mode), 144 is_popup_mode_(is_popup_mode),
145 show_focus_rect_(false), 145 show_focus_rect_(false),
146 template_url_service_(NULL), 146 template_url_service_(NULL),
147 dropdown_animation_offset_(0),
148 web_contents_null_at_last_refresh_(true) { 147 web_contents_null_at_last_refresh_(true) {
149 edit_bookmarks_enabled_.Init( 148 edit_bookmarks_enabled_.Init(
150 bookmarks::prefs::kEditBookmarksEnabled, profile->GetPrefs(), 149 bookmarks::prefs::kEditBookmarksEnabled, profile->GetPrefs(),
151 base::Bind(&LocationBarView::UpdateWithoutTabRestore, 150 base::Bind(&LocationBarView::UpdateWithoutTabRestore,
152 base::Unretained(this))); 151 base::Unretained(this)));
153 152
154 ui_zoom::ZoomEventManager::GetForBrowserContext(profile) 153 ui_zoom::ZoomEventManager::GetForBrowserContext(profile)
155 ->AddZoomEventManagerObserver(this); 154 ->AddZoomEventManagerObserver(this);
156 } 155 }
157 156
(...skipping 1216 matching lines...) Expand 10 before | Expand all | Expand 10 after
1374 return delegate_->GetToolbarModel(); 1373 return delegate_->GetToolbarModel();
1375 } 1374 }
1376 1375
1377 //////////////////////////////////////////////////////////////////////////////// 1376 ////////////////////////////////////////////////////////////////////////////////
1378 // LocationBarView, private DropdownBarHostDelegate implementation: 1377 // LocationBarView, private DropdownBarHostDelegate implementation:
1379 1378
1380 void LocationBarView::SetFocusAndSelection(bool select_all) { 1379 void LocationBarView::SetFocusAndSelection(bool select_all) {
1381 FocusLocation(select_all); 1380 FocusLocation(select_all);
1382 } 1381 }
1383 1382
1384 void LocationBarView::SetAnimationOffset(int offset) {
1385 dropdown_animation_offset_ = offset;
1386 }
1387
1388 //////////////////////////////////////////////////////////////////////////////// 1383 ////////////////////////////////////////////////////////////////////////////////
1389 // LocationBarView, private TemplateURLServiceObserver implementation: 1384 // LocationBarView, private TemplateURLServiceObserver implementation:
1390 1385
1391 void LocationBarView::OnTemplateURLServiceChanged() { 1386 void LocationBarView::OnTemplateURLServiceChanged() {
1392 template_url_service_->RemoveObserver(this); 1387 template_url_service_->RemoveObserver(this);
1393 template_url_service_ = NULL; 1388 template_url_service_ = NULL;
1394 // If the browser is no longer active, let's not show the info bubble, as this 1389 // 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. 1390 // would make the browser the active window again.
1396 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive()) 1391 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive())
1397 ShowFirstRunBubble(); 1392 ShowFirstRunBubble();
1398 } 1393 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/location_bar/location_bar_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698