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

Unified Diff: ui/views/view.cc

Issue 1159033008: Refactor ViewsDelegate singleton (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed review comments Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: ui/views/view.cc
diff --git a/ui/views/view.cc b/ui/views/view.cc
index 0b6efdf1086b52cf535a4b253d5fb92f70749d9c..420f5da6e20295250092a6c39a4481e51eecc4be 100644
--- a/ui/views/view.cc
+++ b/ui/views/view.cc
@@ -83,9 +83,6 @@ const View* GetHierarchyRoot(const View* view) {
} // namespace
// static
-ViewsDelegate* ViewsDelegate::views_delegate = NULL;
-
-// static
const char View::kViewClassName[] = "View";
////////////////////////////////////////////////////////////////////////////////
@@ -1283,8 +1280,8 @@ gfx::NativeViewAccessible View::GetNativeViewAccessible() {
void View::NotifyAccessibilityEvent(
ui::AXEvent event_type,
bool send_native_event) {
- if (ViewsDelegate::views_delegate)
- ViewsDelegate::views_delegate->NotifyAccessibilityEvent(this, event_type);
+ if (ViewsDelegate::GetInstance())
+ ViewsDelegate::GetInstance()->NotifyAccessibilityEvent(this, event_type);
if (send_native_event && GetWidget()) {
if (!native_view_accessibility_)

Powered by Google App Engine
This is Rietveld 408576698