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

Side by Side Diff: chrome/browser/dom_ui/dom_ui_factory.cc

Issue 3675002: Add network_menu_ui.cc and network_menu.js (Closed)
Patch Set: . Created 10 years, 2 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/dom_ui/dom_ui_factory.h" 5 #include "chrome/browser/dom_ui/dom_ui_factory.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/browser_thread.h" 8 #include "chrome/browser/browser_thread.h"
9 #include "chrome/browser/dom_ui/bookmarks_ui.h" 9 #include "chrome/browser/dom_ui/bookmarks_ui.h"
10 #include "chrome/browser/dom_ui/bug_report_ui.h" 10 #include "chrome/browser/dom_ui/bug_report_ui.h"
(...skipping 25 matching lines...) Expand all
36 #include "chrome/common/url_constants.h" 36 #include "chrome/common/url_constants.h"
37 #include "googleurl/src/gurl.h" 37 #include "googleurl/src/gurl.h"
38 38
39 #if defined(OS_CHROMEOS) 39 #if defined(OS_CHROMEOS)
40 #include "chrome/browser/chromeos/dom_ui/imageburner_ui.h" 40 #include "chrome/browser/chromeos/dom_ui/imageburner_ui.h"
41 #include "chrome/browser/chromeos/dom_ui/menu_ui.h" 41 #include "chrome/browser/chromeos/dom_ui/menu_ui.h"
42 #include "chrome/browser/chromeos/dom_ui/mobile_setup_ui.h" 42 #include "chrome/browser/chromeos/dom_ui/mobile_setup_ui.h"
43 #include "chrome/browser/chromeos/dom_ui/register_page_ui.h" 43 #include "chrome/browser/chromeos/dom_ui/register_page_ui.h"
44 #include "chrome/browser/chromeos/dom_ui/system_info_ui.h" 44 #include "chrome/browser/chromeos/dom_ui/system_info_ui.h"
45 #include "chrome/browser/chromeos/dom_ui/wrench_menu_ui.h" 45 #include "chrome/browser/chromeos/dom_ui/wrench_menu_ui.h"
46 #include "chrome/browser/chromeos/dom_ui/network_menu_ui.h"
46 #include "chrome/browser/dom_ui/filebrowse_ui.h" 47 #include "chrome/browser/dom_ui/filebrowse_ui.h"
47 #include "chrome/browser/dom_ui/mediaplayer_ui.h" 48 #include "chrome/browser/dom_ui/mediaplayer_ui.h"
48 #endif 49 #endif
49 50
50 const DOMUITypeID DOMUIFactory::kNoDOMUI = NULL; 51 const DOMUITypeID DOMUIFactory::kNoDOMUI = NULL;
51 52
52 // A function for creating a new DOMUI. The caller owns the return value, which 53 // A function for creating a new DOMUI. The caller owns the return value, which
53 // may be NULL (for example, if the URL refers to an non-existent extension). 54 // may be NULL (for example, if the URL refers to an non-existent extension).
54 typedef DOMUI* (*DOMUIFactoryFunction)(TabContents* tab_contents, 55 typedef DOMUI* (*DOMUIFactoryFunction)(TabContents* tab_contents,
55 const GURL& url); 56 const GURL& url);
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 if (url.host() == chrome::kChromeUISettingsHost) 163 if (url.host() == chrome::kChromeUISettingsHost)
163 return &NewDOMUI<OptionsUI>; 164 return &NewDOMUI<OptionsUI>;
164 if (url.host() == chrome::kChromeUISlideshowHost) 165 if (url.host() == chrome::kChromeUISlideshowHost)
165 return &NewDOMUI<SlideshowUI>; 166 return &NewDOMUI<SlideshowUI>;
166 if (url.host() == chrome::kChromeUISystemInfoHost) 167 if (url.host() == chrome::kChromeUISystemInfoHost)
167 return &NewDOMUI<SystemInfoUI>; 168 return &NewDOMUI<SystemInfoUI>;
168 if (url.host() == chrome::kChromeUIMenu) 169 if (url.host() == chrome::kChromeUIMenu)
169 return &NewDOMUI<chromeos::MenuUI>; 170 return &NewDOMUI<chromeos::MenuUI>;
170 if (url.host() == chrome::kChromeUIWrenchMenu) 171 if (url.host() == chrome::kChromeUIWrenchMenu)
171 return &NewDOMUI<chromeos::WrenchMenuUI>; 172 return &NewDOMUI<chromeos::WrenchMenuUI>;
173 if (url.host() == chrome::kChromeUINetworkMenu)
174 return &NewDOMUI<chromeos::NetworkMenuUI>;
172 #else 175 #else
173 if (url.host() == chrome::kChromeUISettingsHost) { 176 if (url.host() == chrome::kChromeUISettingsHost) {
174 if (CommandLine::ForCurrentProcess()->HasSwitch( 177 if (CommandLine::ForCurrentProcess()->HasSwitch(
175 switches::kEnableTabbedOptions)) { 178 switches::kEnableTabbedOptions)) {
176 return &NewDOMUI<OptionsUI>; 179 return &NewDOMUI<OptionsUI>;
177 } 180 }
178 } 181 }
179 if (url.host() == chrome::kChromeUIPrintHost) { 182 if (url.host() == chrome::kChromeUIPrintHost) {
180 if (CommandLine::ForCurrentProcess()->HasSwitch( 183 if (CommandLine::ForCurrentProcess()->HasSwitch(
181 switches::kEnablePrintPreview)) { 184 switches::kEnablePrintPreview)) {
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 if (page_url.host() == chrome::kChromeUIPluginsHost) 275 if (page_url.host() == chrome::kChromeUIPluginsHost)
273 return PluginsUI::GetFaviconResourceBytes(); 276 return PluginsUI::GetFaviconResourceBytes();
274 277
275 #if defined(ENABLE_REMOTING) 278 #if defined(ENABLE_REMOTING)
276 if (page_url.host() == chrome::kChromeUIRemotingHost) 279 if (page_url.host() == chrome::kChromeUIRemotingHost)
277 return RemotingUI::GetFaviconResourceBytes(); 280 return RemotingUI::GetFaviconResourceBytes();
278 #endif 281 #endif
279 282
280 return NULL; 283 return NULL;
281 } 284 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/status/network_menu.cc ('k') | chrome/browser/resources/network_menu.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698