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

Side by Side Diff: chrome/browser/ui/views/frame/global_menu_bar_registrar_x11.cc

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 years, 3 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/frame/global_menu_bar_registrar_x11.h" 5 #include "chrome/browser/ui/views/frame/global_menu_bar_registrar_x11.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/debug/leak_annotations.h" 8 #include "base/debug/leak_annotations.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "chrome/browser/ui/views/frame/global_menu_bar_x11.h" 10 #include "chrome/browser/ui/views/frame/global_menu_bar_x11.h"
11 #include "content/public/browser/browser_thread.h" 11 #include "content/public/browser/browser_thread.h"
12 12
13 using content::BrowserThread; 13 using content::BrowserThread;
14 14
15 namespace { 15 namespace {
16 16
17 const char kAppMenuRegistrarName[] = "com.canonical.AppMenu.Registrar"; 17 const char kAppMenuRegistrarName[] = "com.canonical.AppMenu.Registrar";
18 const char kAppMenuRegistrarPath[] = "/com/canonical/AppMenu/Registrar"; 18 const char kAppMenuRegistrarPath[] = "/com/canonical/AppMenu/Registrar";
19 19
20 } // namespace 20 } // namespace
21 21
22 // static 22 // static
23 GlobalMenuBarRegistrarX11* GlobalMenuBarRegistrarX11::GetInstance() { 23 GlobalMenuBarRegistrarX11* GlobalMenuBarRegistrarX11::GetInstance() {
24 return Singleton<GlobalMenuBarRegistrarX11>::get(); 24 return base::Singleton<GlobalMenuBarRegistrarX11>::get();
25 } 25 }
26 26
27 void GlobalMenuBarRegistrarX11::OnWindowMapped(unsigned long xid) { 27 void GlobalMenuBarRegistrarX11::OnWindowMapped(unsigned long xid) {
28 live_xids_.insert(xid); 28 live_xids_.insert(xid);
29 29
30 if (registrar_proxy_) 30 if (registrar_proxy_)
31 RegisterXID(xid); 31 RegisterXID(xid);
32 } 32 }
33 33
34 void GlobalMenuBarRegistrarX11::OnWindowUnmapped(unsigned long xid) { 34 void GlobalMenuBarRegistrarX11::OnWindowUnmapped(unsigned long xid) {
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 133
134 void GlobalMenuBarRegistrarX11::OnNameOwnerChanged(GObject* /* ignored */, 134 void GlobalMenuBarRegistrarX11::OnNameOwnerChanged(GObject* /* ignored */,
135 GParamSpec* /* ignored */) { 135 GParamSpec* /* ignored */) {
136 // If the name owner changed, we need to reregister all the live xids with 136 // If the name owner changed, we need to reregister all the live xids with
137 // the system. 137 // the system.
138 for (std::set<unsigned long>::const_iterator it = live_xids_.begin(); 138 for (std::set<unsigned long>::const_iterator it = live_xids_.begin();
139 it != live_xids_.end(); ++it) { 139 it != live_xids_.end(); ++it) {
140 RegisterXID(*it); 140 RegisterXID(*it);
141 } 141 }
142 } 142 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/global_menu_bar_registrar_x11.h ('k') | chrome/browser/ui/views/select_file_dialog_extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698