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

Side by Side Diff: chrome/browser/ui/webui/chromeos/mobile_setup_dialog.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/webui/chromeos/mobile_setup_dialog.h" 5 #include "chrome/browser/ui/webui/chromeos/mobile_setup_dialog.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/singleton.h" 8 #include "base/memory/singleton.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/browser_shutdown.h" 10 #include "chrome/browser/browser_shutdown.h"
(...skipping 17 matching lines...) Expand all
28 using content::WebContents; 28 using content::WebContents;
29 using content::WebUIMessageHandler; 29 using content::WebUIMessageHandler;
30 using ui::WebDialogDelegate; 30 using ui::WebDialogDelegate;
31 31
32 class MobileSetupDialogDelegate : public WebDialogDelegate { 32 class MobileSetupDialogDelegate : public WebDialogDelegate {
33 public: 33 public:
34 static MobileSetupDialogDelegate* GetInstance(); 34 static MobileSetupDialogDelegate* GetInstance();
35 void ShowDialog(const std::string& service_path); 35 void ShowDialog(const std::string& service_path);
36 36
37 protected: 37 protected:
38 friend struct DefaultSingletonTraits<MobileSetupDialogDelegate>; 38 friend struct base::DefaultSingletonTraits<MobileSetupDialogDelegate>;
39 39
40 MobileSetupDialogDelegate(); 40 MobileSetupDialogDelegate();
41 ~MobileSetupDialogDelegate() override; 41 ~MobileSetupDialogDelegate() override;
42 42
43 void OnCloseDialog(); 43 void OnCloseDialog();
44 44
45 // WebDialogDelegate overrides. 45 // WebDialogDelegate overrides.
46 ui::ModalType GetDialogModalType() const override; 46 ui::ModalType GetDialogModalType() const override;
47 base::string16 GetDialogTitle() const override; 47 base::string16 GetDialogTitle() const override;
48 GURL GetDialogContentURL() const override; 48 GURL GetDialogContentURL() const override;
(...skipping 15 matching lines...) Expand all
64 64
65 // static 65 // static
66 void MobileSetupDialog::Show(const std::string& service_path) { 66 void MobileSetupDialog::Show(const std::string& service_path) {
67 DCHECK_CURRENTLY_ON(BrowserThread::UI); 67 DCHECK_CURRENTLY_ON(BrowserThread::UI);
68 MobileSetupDialogDelegate::GetInstance()->ShowDialog(service_path); 68 MobileSetupDialogDelegate::GetInstance()->ShowDialog(service_path);
69 } 69 }
70 70
71 // static 71 // static
72 MobileSetupDialogDelegate* MobileSetupDialogDelegate::GetInstance() { 72 MobileSetupDialogDelegate* MobileSetupDialogDelegate::GetInstance() {
73 DCHECK_CURRENTLY_ON(BrowserThread::UI); 73 DCHECK_CURRENTLY_ON(BrowserThread::UI);
74 return Singleton<MobileSetupDialogDelegate>::get(); 74 return base::Singleton<MobileSetupDialogDelegate>::get();
75 } 75 }
76 76
77 MobileSetupDialogDelegate::MobileSetupDialogDelegate() : dialog_window_(NULL) { 77 MobileSetupDialogDelegate::MobileSetupDialogDelegate() : dialog_window_(NULL) {
78 } 78 }
79 79
80 MobileSetupDialogDelegate::~MobileSetupDialogDelegate() { 80 MobileSetupDialogDelegate::~MobileSetupDialogDelegate() {
81 } 81 }
82 82
83 void MobileSetupDialogDelegate::ShowDialog(const std::string& service_path) { 83 void MobileSetupDialogDelegate::ShowDialog(const std::string& service_path) {
84 service_path_ = service_path; 84 service_path_ = service_path;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 } 150 }
151 151
152 bool MobileSetupDialogDelegate::ShouldShowDialogTitle() const { 152 bool MobileSetupDialogDelegate::ShouldShowDialogTitle() const {
153 return true; 153 return true;
154 } 154 }
155 155
156 bool MobileSetupDialogDelegate::HandleContextMenu( 156 bool MobileSetupDialogDelegate::HandleContextMenu(
157 const content::ContextMenuParams& params) { 157 const content::ContextMenuParams& params) {
158 return true; 158 return true;
159 } 159 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/l10n_util_unittest.cc ('k') | chrome/browser/ui/webui/ntp/app_resource_cache_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698