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

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

Issue 1478303003: Converted all Views to use an InkDropDelegate instead of a InkDropAnimationController. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added missing include. 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
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),
147 web_contents_null_at_last_refresh_(true) { 148 web_contents_null_at_last_refresh_(true) {
148 edit_bookmarks_enabled_.Init( 149 edit_bookmarks_enabled_.Init(
149 bookmarks::prefs::kEditBookmarksEnabled, profile->GetPrefs(), 150 bookmarks::prefs::kEditBookmarksEnabled, profile->GetPrefs(),
150 base::Bind(&LocationBarView::UpdateWithoutTabRestore, 151 base::Bind(&LocationBarView::UpdateWithoutTabRestore,
151 base::Unretained(this))); 152 base::Unretained(this)));
152 153
153 ui_zoom::ZoomEventManager::GetForBrowserContext(profile) 154 ui_zoom::ZoomEventManager::GetForBrowserContext(profile)
154 ->AddZoomEventManagerObserver(this); 155 ->AddZoomEventManagerObserver(this);
155 } 156 }
156 157
(...skipping 1216 matching lines...) Expand 10 before | Expand all | Expand 10 after
1373 return delegate_->GetToolbarModel(); 1374 return delegate_->GetToolbarModel();
1374 } 1375 }
1375 1376
1376 //////////////////////////////////////////////////////////////////////////////// 1377 ////////////////////////////////////////////////////////////////////////////////
1377 // LocationBarView, private DropdownBarHostDelegate implementation: 1378 // LocationBarView, private DropdownBarHostDelegate implementation:
1378 1379
1379 void LocationBarView::SetFocusAndSelection(bool select_all) { 1380 void LocationBarView::SetFocusAndSelection(bool select_all) {
1380 FocusLocation(select_all); 1381 FocusLocation(select_all);
1381 } 1382 }
1382 1383
1384 void LocationBarView::SetAnimationOffset(int offset) {
1385 dropdown_animation_offset_ = offset;
1386 }
1387
1383 //////////////////////////////////////////////////////////////////////////////// 1388 ////////////////////////////////////////////////////////////////////////////////
1384 // LocationBarView, private TemplateURLServiceObserver implementation: 1389 // LocationBarView, private TemplateURLServiceObserver implementation:
1385 1390
1386 void LocationBarView::OnTemplateURLServiceChanged() { 1391 void LocationBarView::OnTemplateURLServiceChanged() {
1387 template_url_service_->RemoveObserver(this); 1392 template_url_service_->RemoveObserver(this);
1388 template_url_service_ = NULL; 1393 template_url_service_ = NULL;
1389 // 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
1390 // would make the browser the active window again. 1395 // would make the browser the active window again.
1391 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive()) 1396 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive())
1392 ShowFirstRunBubble(); 1397 ShowFirstRunBubble();
1393 } 1398 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698