summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
authorsatish@chromium.org <satish@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-13 08:18:55 +0000
committersatish@chromium.org <satish@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-13 08:18:55 +0000
commit8e8bb6d329bdad0efe5bddd5d39e0efe64d9846a (patch)
treea7425d106d83f1f031516e18ea9600363341fdb8 /views
parent1bc1c69f95dab2c34232a5c8793cf9db51af2386 (diff)
downloadchromium_src-8e8bb6d329bdad0efe5bddd5d39e0efe64d9846a.zip
chromium_src-8e8bb6d329bdad0efe5bddd5d39e0efe64d9846a.tar.gz
chromium_src-8e8bb6d329bdad0efe5bddd5d39e0efe64d9846a.tar.bz2
Rename all methods accessing Singleton<T> as GetInstance().
This is in preparation to a subsequent CL where Singleton<T> will restrict access to only the type being made singleton. I also moved pepper::ResourceTracker to a lazy instance since there were too many places in code where this class was being accessed from and this was a smaller change than renaming methods in that case. BUG=65298 TEST=all existing tests should pass. Review URL: http://codereview.chromium.org/5685007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68982 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r--views/focus/external_focus_tracker.cc2
-rw-r--r--views/focus/focus_manager.cc8
-rw-r--r--views/focus/view_storage.cc2
-rw-r--r--views/focus/view_storage.h2
-rw-r--r--views/view_unittest.cc2
-rw-r--r--views/widget/root_view.cc2
6 files changed, 9 insertions, 9 deletions
diff --git a/views/focus/external_focus_tracker.cc b/views/focus/external_focus_tracker.cc
index b08d287..0787359 100644
--- a/views/focus/external_focus_tracker.cc
+++ b/views/focus/external_focus_tracker.cc
@@ -16,7 +16,7 @@ ExternalFocusTracker::ExternalFocusTracker(View* parent_view,
parent_view_(parent_view) {
DCHECK(focus_manager);
DCHECK(parent_view);
- view_storage_ = ViewStorage::GetSharedInstance();
+ view_storage_ = ViewStorage::GetInstance();
last_focused_view_storage_id_ = view_storage_->CreateStorageID();
// Store the view which is focused when we're created.
StartTracking();
diff --git a/views/focus/focus_manager.cc b/views/focus/focus_manager.cc
index 4848e4b..5e869ad 100644
--- a/views/focus/focus_manager.cc
+++ b/views/focus/focus_manager.cc
@@ -71,7 +71,7 @@ FocusManager::FocusManager(Widget* widget)
focus_change_reason_(kReasonDirectFocusChange) {
DCHECK(widget_);
stored_focused_view_storage_id_ =
- ViewStorage::GetSharedInstance()->CreateStorageID();
+ ViewStorage::GetInstance()->CreateStorageID();
}
FocusManager::~FocusManager() {
@@ -332,7 +332,7 @@ void FocusManager::ClearFocus() {
}
void FocusManager::StoreFocusedView() {
- ViewStorage* view_storage = ViewStorage::GetSharedInstance();
+ ViewStorage* view_storage = ViewStorage::GetInstance();
if (!view_storage) {
// This should never happen but bug 981648 seems to indicate it could.
NOTREACHED();
@@ -365,7 +365,7 @@ void FocusManager::StoreFocusedView() {
}
void FocusManager::RestoreFocusedView() {
- ViewStorage* view_storage = ViewStorage::GetSharedInstance();
+ ViewStorage* view_storage = ViewStorage::GetInstance();
if (!view_storage) {
// This should never happen but bug 981648 seems to indicate it could.
NOTREACHED();
@@ -399,7 +399,7 @@ void FocusManager::RestoreFocusedView() {
}
void FocusManager::ClearStoredFocusedView() {
- ViewStorage* view_storage = ViewStorage::GetSharedInstance();
+ ViewStorage* view_storage = ViewStorage::GetInstance();
if (!view_storage) {
// This should never happen but bug 981648 seems to indicate it could.
NOTREACHED();
diff --git a/views/focus/view_storage.cc b/views/focus/view_storage.cc
index 9b8b9ee..1852044 100644
--- a/views/focus/view_storage.cc
+++ b/views/focus/view_storage.cc
@@ -12,7 +12,7 @@
namespace views {
// static
-ViewStorage* ViewStorage::GetSharedInstance() {
+ViewStorage* ViewStorage::GetInstance() {
return Singleton<ViewStorage>::get();
}
diff --git a/views/focus/view_storage.h b/views/focus/view_storage.h
index bc34bb2..892989a 100644
--- a/views/focus/view_storage.h
+++ b/views/focus/view_storage.h
@@ -24,7 +24,7 @@ class ViewStorage {
public:
// Returns the global ViewStorage instance.
// It is guaranted to be non NULL.
- static ViewStorage* GetSharedInstance();
+ static ViewStorage* GetInstance();
// Returns a unique storage id that can be used to store/retrieve views.
int CreateStorageID();
diff --git a/views/view_unittest.cc b/views/view_unittest.cc
index 886f1f2..fe5effe 100644
--- a/views/view_unittest.cc
+++ b/views/view_unittest.cc
@@ -616,7 +616,7 @@ TEST_F(ViewTest, DISABLED_Painting) {
*/
TEST_F(ViewTest, RemoveNotification) {
- views::ViewStorage* vs = views::ViewStorage::GetSharedInstance();
+ views::ViewStorage* vs = views::ViewStorage::GetInstance();
views::Widget* window = CreateWidget();
views::RootView* root_view = window->GetRootView();
diff --git a/views/widget/root_view.cc b/views/widget/root_view.cc
index 92f6cf7..b7c424b 100644
--- a/views/widget/root_view.cc
+++ b/views/widget/root_view.cc
@@ -296,7 +296,7 @@ void RootView::ViewHierarchyChanged(bool is_add, View* parent, View* child) {
if (focus_manager)
focus_manager->ViewRemoved(parent, child);
- ViewStorage::GetSharedInstance()->ViewRemoved(parent, child);
+ ViewStorage::GetInstance()->ViewRemoved(parent, child);
}
}