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

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

Issue 8800011: Use Textfield's view ID instead of Location bar's view id (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #if defined(TOOLKIT_USES_GTK) 7 #if defined(TOOLKIT_USES_GTK)
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #endif 9 #endif
10 10
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 DeletePageActionViews(); 335 DeletePageActionViews();
336 if (page_action_views_.size() != count_before) { 336 if (page_action_views_.size() != count_before) {
337 content::NotificationService::current()->Notify( 337 content::NotificationService::current()->Notify(
338 chrome::NOTIFICATION_EXTENSION_PAGE_ACTION_COUNT_CHANGED, 338 chrome::NOTIFICATION_EXTENSION_PAGE_ACTION_COUNT_CHANGED,
339 content::Source<LocationBar>(this), 339 content::Source<LocationBar>(this),
340 content::NotificationService::NoDetails()); 340 content::NotificationService::NoDetails());
341 } 341 }
342 } 342 }
343 343
344 void LocationBarView::OnFocus() { 344 void LocationBarView::OnFocus() {
345 // Focus the view widget first which implements accessibility for Chrome OS. 345 // Focus the view widget first which implements accessibility for
346 // Chrome OS. It is noop on Win. This should be removed once
347 // Chrome OS migrates to aura, which uses Views' textfield that receives
348 // focus. See crbug.com/106428.
346 GetWidget()->NotifyAccessibilityEvent( 349 GetWidget()->NotifyAccessibilityEvent(
347 this, ui::AccessibilityTypes::EVENT_FOCUS, false); 350 this, ui::AccessibilityTypes::EVENT_FOCUS, false);
348 351
349 // Then focus the native location view which implements accessibility for 352 // Then focus the native location view which implements accessibility for
350 // Windows. 353 // Windows.
351 location_entry_->SetFocus(); 354 location_entry_->SetFocus();
352 } 355 }
353 356
354 void LocationBarView::SetPreviewEnabledPageAction(ExtensionAction* page_action, 357 void LocationBarView::SetPreviewEnabledPageAction(ExtensionAction* page_action,
355 bool preview_enabled) { 358 bool preview_enabled) {
(...skipping 871 matching lines...) Expand 10 before | Expand all | Expand 10 after
1227 !suggested_text_view_->GetText().empty(); 1230 !suggested_text_view_->GetText().empty();
1228 } 1231 }
1229 1232
1230 #if !defined(USE_AURA) 1233 #if !defined(USE_AURA)
1231 OmniboxViewWin* LocationBarView::GetOmniboxViewWin() { 1234 OmniboxViewWin* LocationBarView::GetOmniboxViewWin() {
1232 CHECK(!views::Widget::IsPureViews()); 1235 CHECK(!views::Widget::IsPureViews());
1233 return static_cast<OmniboxViewWin*>(location_entry_.get()); 1236 return static_cast<OmniboxViewWin*>(location_entry_.get());
1234 } 1237 }
1235 #endif 1238 #endif
1236 #endif 1239 #endif
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/find_bar_host_interactive_uitest.cc ('k') | chrome/browser/ui/views/omnibox/omnibox_view_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698