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

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

Issue 13524005: Cleanup: remove NotifyAccessibilityEvent from views::Widget. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 8 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 | Annotate | Revision Log
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/command_line.h" 10 #include "base/command_line.h"
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 model_->GetInputInProgress() ? NULL : GetWebContents()); 491 model_->GetInputInProgress() ? NULL : GetWebContents());
492 Layout(); 492 Layout();
493 SchedulePaint(); 493 SchedulePaint();
494 } 494 }
495 495
496 void LocationBarView::OnFocus() { 496 void LocationBarView::OnFocus() {
497 // Focus the view widget first which implements accessibility for 497 // Focus the view widget first which implements accessibility for
498 // Chrome OS. It is noop on Win. This should be removed once 498 // Chrome OS. It is noop on Win. This should be removed once
499 // Chrome OS migrates to aura, which uses Views' textfield that receives 499 // Chrome OS migrates to aura, which uses Views' textfield that receives
500 // focus. See crbug.com/106428. 500 // focus. See crbug.com/106428.
501 GetWidget()->NotifyAccessibilityEvent( 501 NotifyAccessibilityEvent(ui::AccessibilityTypes::EVENT_FOCUS, false);
502 this, ui::AccessibilityTypes::EVENT_FOCUS, false);
503 502
504 // Then focus the native location view which implements accessibility for 503 // Then focus the native location view which implements accessibility for
505 // Windows. 504 // Windows.
506 location_entry_->SetFocus(); 505 location_entry_->SetFocus();
507 } 506 }
508 507
509 void LocationBarView::SetPreviewEnabledPageAction(ExtensionAction* page_action, 508 void LocationBarView::SetPreviewEnabledPageAction(ExtensionAction* page_action,
510 bool preview_enabled) { 509 bool preview_enabled) {
511 if (mode_ != NORMAL) 510 if (mode_ != NORMAL)
512 return; 511 return;
(...skipping 954 matching lines...) Expand 10 before | Expand all | Expand 10 after
1467 int LocationBarView::GetInternalHeight(bool use_preferred_size) { 1466 int LocationBarView::GetInternalHeight(bool use_preferred_size) {
1468 int total_height = 1467 int total_height =
1469 use_preferred_size ? GetPreferredSize().height() : height(); 1468 use_preferred_size ? GetPreferredSize().height() : height();
1470 return std::max(total_height - (kVerticalEdgeThickness * 2), 0); 1469 return std::max(total_height - (kVerticalEdgeThickness * 2), 0);
1471 } 1470 }
1472 1471
1473 bool LocationBarView::HasValidSuggestText() const { 1472 bool LocationBarView::HasValidSuggestText() const {
1474 return suggested_text_view_ && !suggested_text_view_->size().IsEmpty() && 1473 return suggested_text_view_ && !suggested_text_view_->size().IsEmpty() &&
1475 !suggested_text_view_->text().empty(); 1474 !suggested_text_view_->text().empty();
1476 } 1475 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/infobars/infobar_view.cc ('k') | chrome/browser/ui/views/omnibox/omnibox_view_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698