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

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: Removed CustomButton::set_ink_drop_action_on_click() method. 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 zoom_view_(nullptr), 135 zoom_view_(nullptr),
136 open_pdf_in_reader_view_(nullptr), 136 open_pdf_in_reader_view_(nullptr),
137 manage_passwords_icon_view_(nullptr), 137 manage_passwords_icon_view_(nullptr),
138 save_credit_card_icon_view_(nullptr), 138 save_credit_card_icon_view_(nullptr),
139 translate_icon_view_(nullptr), 139 translate_icon_view_(nullptr),
140 star_view_(nullptr), 140 star_view_(nullptr),
141 size_animation_(this), 141 size_animation_(this),
142 is_popup_mode_(is_popup_mode), 142 is_popup_mode_(is_popup_mode),
143 show_focus_rect_(false), 143 show_focus_rect_(false),
144 template_url_service_(NULL), 144 template_url_service_(NULL),
145 dropdown_animation_offset_(0),
145 web_contents_null_at_last_refresh_(true) { 146 web_contents_null_at_last_refresh_(true) {
146 edit_bookmarks_enabled_.Init( 147 edit_bookmarks_enabled_.Init(
147 bookmarks::prefs::kEditBookmarksEnabled, profile->GetPrefs(), 148 bookmarks::prefs::kEditBookmarksEnabled, profile->GetPrefs(),
148 base::Bind(&LocationBarView::UpdateWithoutTabRestore, 149 base::Bind(&LocationBarView::UpdateWithoutTabRestore,
149 base::Unretained(this))); 150 base::Unretained(this)));
150 151
151 ui_zoom::ZoomEventManager::GetForBrowserContext(profile) 152 ui_zoom::ZoomEventManager::GetForBrowserContext(profile)
152 ->AddZoomEventManagerObserver(this); 153 ->AddZoomEventManagerObserver(this);
153 } 154 }
154 155
(...skipping 1214 matching lines...) Expand 10 before | Expand all | Expand 10 after
1369 return delegate_->GetToolbarModel(); 1370 return delegate_->GetToolbarModel();
1370 } 1371 }
1371 1372
1372 //////////////////////////////////////////////////////////////////////////////// 1373 ////////////////////////////////////////////////////////////////////////////////
1373 // LocationBarView, private DropdownBarHostDelegate implementation: 1374 // LocationBarView, private DropdownBarHostDelegate implementation:
1374 1375
1375 void LocationBarView::SetFocusAndSelection(bool select_all) { 1376 void LocationBarView::SetFocusAndSelection(bool select_all) {
1376 FocusLocation(select_all); 1377 FocusLocation(select_all);
1377 } 1378 }
1378 1379
1380 void LocationBarView::SetAnimationOffset(int offset) {
1381 dropdown_animation_offset_ = offset;
1382 }
1383
1379 //////////////////////////////////////////////////////////////////////////////// 1384 ////////////////////////////////////////////////////////////////////////////////
1380 // LocationBarView, private TemplateURLServiceObserver implementation: 1385 // LocationBarView, private TemplateURLServiceObserver implementation:
1381 1386
1382 void LocationBarView::OnTemplateURLServiceChanged() { 1387 void LocationBarView::OnTemplateURLServiceChanged() {
1383 template_url_service_->RemoveObserver(this); 1388 template_url_service_->RemoveObserver(this);
1384 template_url_service_ = nullptr; 1389 template_url_service_ = nullptr;
1385 // 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
1386 // would make the browser the active window again. 1391 // would make the browser the active window again.
1387 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive()) 1392 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive())
1388 ShowFirstRunBubble(); 1393 ShowFirstRunBubble();
1389 } 1394 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/location_bar/location_bar_view.h ('k') | chrome/browser/ui/views/toolbar/app_menu_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698