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

Side by Side Diff: ui/base/x/x11_menu_list.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
« no previous file with comments | « ui/base/x/x11_menu_list.h ('k') | ui/base/x/x11_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 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 "ui/base/x/x11_menu_list.h" 5 #include "ui/base/x/x11_menu_list.h"
6 6
7 #include "base/memory/singleton.h" 7 #include "base/memory/singleton.h"
8 #include "ui/base/x/x11_util.h" 8 #include "ui/base/x/x11_util.h"
9 9
10 namespace ui { 10 namespace ui {
11 11
12 // static 12 // static
13 XMenuList* XMenuList::GetInstance() { 13 XMenuList* XMenuList::GetInstance() {
14 return Singleton<XMenuList>::get(); 14 return base::Singleton<XMenuList>::get();
15 } 15 }
16 16
17 XMenuList::XMenuList() 17 XMenuList::XMenuList()
18 : menu_type_atom_(GetAtom("_NET_WM_WINDOW_TYPE_MENU")) { 18 : menu_type_atom_(GetAtom("_NET_WM_WINDOW_TYPE_MENU")) {
19 } 19 }
20 20
21 XMenuList::~XMenuList() { 21 XMenuList::~XMenuList() {
22 menus_.clear(); 22 menus_.clear();
23 } 23 }
24 24
(...skipping 12 matching lines...) Expand all
37 if (iter == menus_.end()) 37 if (iter == menus_.end())
38 return; 38 return;
39 menus_.erase(iter); 39 menus_.erase(iter);
40 } 40 }
41 41
42 void XMenuList::InsertMenuWindowXIDs(std::vector<XID>* stack) { 42 void XMenuList::InsertMenuWindowXIDs(std::vector<XID>* stack) {
43 stack->insert(stack->begin(), menus_.begin(), menus_.end()); 43 stack->insert(stack->begin(), menus_.begin(), menus_.end());
44 } 44 }
45 45
46 } // namespace ui 46 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/x/x11_menu_list.h ('k') | ui/base/x/x11_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698