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

Side by Side Diff: chrome/browser/ui/views/accessible_pane_view.cc

Issue 5685007: Rename all methods accessing Singleton<T> as GetInstance(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 10 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "base/logging.h" 5 #include "base/logging.h"
6 #include "chrome/browser/ui/view_ids.h" 6 #include "chrome/browser/ui/view_ids.h"
7 #include "chrome/browser/ui/views/frame/browser_view.h" 7 #include "chrome/browser/ui/views/frame/browser_view.h"
8 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" 8 #include "chrome/browser/ui/views/location_bar/location_bar_view.h"
9 #include "chrome/browser/ui/views/accessible_pane_view.h" 9 #include "chrome/browser/ui/views/accessible_pane_view.h"
10 #include "views/controls/button/menu_button.h" 10 #include "views/controls/button/menu_button.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 100
101 void AccessiblePaneView::LocationBarSelectAll() { 101 void AccessiblePaneView::LocationBarSelectAll() {
102 views::View* focused_view = GetFocusManager()->GetFocusedView(); 102 views::View* focused_view = GetFocusManager()->GetFocusedView();
103 if (focused_view && 103 if (focused_view &&
104 focused_view->GetClassName() == LocationBarView::kViewClassName) { 104 focused_view->GetClassName() == LocationBarView::kViewClassName) {
105 static_cast<LocationBarView*>(focused_view)->SelectAll(); 105 static_cast<LocationBarView*>(focused_view)->SelectAll();
106 } 106 }
107 } 107 }
108 108
109 void AccessiblePaneView::RestoreLastFocusedView() { 109 void AccessiblePaneView::RestoreLastFocusedView() {
110 views::ViewStorage* view_storage = views::ViewStorage::GetSharedInstance(); 110 views::ViewStorage* view_storage = views::ViewStorage::GetInstance();
111 views::View* last_focused_view = 111 views::View* last_focused_view =
112 view_storage->RetrieveView(last_focused_view_storage_id_); 112 view_storage->RetrieveView(last_focused_view_storage_id_);
113 if (last_focused_view) { 113 if (last_focused_view) {
114 focus_manager_->SetFocusedViewWithReason( 114 focus_manager_->SetFocusedViewWithReason(
115 last_focused_view, views::FocusManager::kReasonFocusRestore); 115 last_focused_view, views::FocusManager::kReasonFocusRestore);
116 } else { 116 } else {
117 // Focus the location bar 117 // Focus the location bar
118 views::View* view = GetAncestorWithClassName(BrowserView::kViewClassName); 118 views::View* view = GetAncestorWithClassName(BrowserView::kViewClassName);
119 if (view) { 119 if (view) {
120 BrowserView* browser_view = static_cast<BrowserView*>(view); 120 BrowserView* browser_view = static_cast<BrowserView*>(view);
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 242
243 views::FocusTraversable* AccessiblePaneView::GetFocusTraversableParent() { 243 views::FocusTraversable* AccessiblePaneView::GetFocusTraversableParent() {
244 DCHECK(pane_has_focus_); 244 DCHECK(pane_has_focus_);
245 return NULL; 245 return NULL;
246 } 246 }
247 247
248 views::View* AccessiblePaneView::GetFocusTraversableParentView() { 248 views::View* AccessiblePaneView::GetFocusTraversableParentView() {
249 DCHECK(pane_has_focus_); 249 DCHECK(pane_has_focus_);
250 return NULL; 250 return NULL;
251 } 251 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/about_ipc_dialog.cc ('k') | chrome/browser/ui/views/frame/browser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698