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

Side by Side Diff: content/browser/webui/web_ui_register.h

Issue 6713082: Move WebUIFactory to chrome/browser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 9 years, 9 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "base/singleton.h"
6
7 class WebUISource;
8
9 // A single-entry registry which keeps track of a WebUISource. The browser
10 // registers a signle WebUISource at a time.
jam 2011/03/24 21:38:43 nit: single
11 class WebUIRegister {
stuartmorgan 2011/03/24 21:09:41 Register is usually a verb. Registry? Registrar?
Evan Stade 2011/03/24 21:28:40 register is also a noun. As a noun it's basically
12 public:
13 // Sets the WebUISource. Clears any previous source.
14 static void RegisterSource(WebUISource* source);
stuartmorgan 2011/03/24 21:09:41 Maybe the behavior would be more obvious if the na
Evan Stade 2011/03/24 21:28:40 ok
15
16 // Returns whatever WebUISource has been registered. This will never return
17 // NULL; if no WebUISource was registered it returns an EmptyWebUISource (for
18 // which no URL is considered a WebUI).
19 static const WebUISource* GetSource();
20
21 // Exists for Singleton. See Singleton implementation.
22 static WebUIRegister* GetInstance();
23
24 private:
25 WebUIRegister();
26 ~WebUIRegister();
27
28 friend struct DefaultSingletonTraits<WebUIRegister>;
29
30 // We don't own this pointer.
31 WebUISource* source_;
32
33 DISALLOW_COPY_AND_ASSIGN(WebUIRegister);
34 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698