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

Side by Side Diff: chrome/browser/chromeos/webui/login/login_container_ui.h

Issue 6579003: Add in chrome://login-container (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Removed some garbage that ended up in the CL and fixed a couple of headers that moved 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 #ifndef CHROME_BROWSER_CHROMEOS_WEBUI_LOGIN_LOGIN_CONTAINER_UI_H_
6 #define CHROME_BROWSER_CHROMEOS_WEBUI_LOGIN_LOGIN_CONTAINER_UI_H_
7 #pragma once
8 #include <string>
9
10 #include "base/scoped_ptr.h"
11 #include "chrome/browser/chromeos/webui/login/login_ui_helpers.h"
12 #include "chrome/browser/ui/webui/chrome_url_data_manager.h"
13 #include "content/browser/webui/web_ui.h"
14
15 class Profile;
16
17 namespace chromeos {
18
19 class BrowserOperationsInterface;
20 class ProfileOperationsInterface;
21
22 // Boilerplate class that is used to associate the LoginContainerUI code with
23 // the URL "chrome://login-container"
24 class LoginContainerUIHTMLSource : public ChromeURLDataManager::DataSource {
25 public:
26 explicit LoginContainerUIHTMLSource(MessageLoop* message_loop);
27
28 virtual void StartDataRequest(const std::string& path,
29 bool is_off_the_record,
30 int request_id);
31 virtual std::string GetMimeType(const std::string&) const {
32 return "text/html";
33 }
34
35 private:
36 scoped_ptr<HTMLOperationsInterface> html_operations_;
37
38 DISALLOW_COPY_AND_ASSIGN(LoginContainerUIHTMLSource);
39 };
40
41 // Main LoginContainerUI handling function. It handles the WebUI hooks that are
42 // supplied for the page to launch the login container.
43 class LoginContainerUIHandler : public WebUIMessageHandler {
44 public:
45 LoginContainerUIHandler();
46 virtual ~LoginContainerUIHandler();
47
48 // WebUIMessageHandler implementation.
49 virtual WebUIMessageHandler* Attach(WebUI* web_ui);
50 virtual void RegisterMessages();
51
52 void HandleOpenLoginScreen(const ListValue* args);
53
54 private:
55 scoped_ptr<BrowserOperationsInterface> browser_operations_;
56 scoped_ptr<ProfileOperationsInterface> profile_operations_;
57
58 DISALLOW_COPY_AND_ASSIGN(LoginContainerUIHandler);
59 };
60
61 // Boilerplate class that is used to associate the LoginContainerUI code with
62 // the Webui code.
63 class LoginContainerUI : public WebUI {
64 public:
65 explicit LoginContainerUI(TabContents* contents);
66
67 // Return the URL for a given search term.
68 static const GURL GetLoginURLWithSearchText(const string16& text);
69
70 static RefCountedMemory* GetFaviconResourceBytes();
71
72 private:
73 DISALLOW_COPY_AND_ASSIGN(LoginContainerUI);
74 };
75
76 } // namespace chromeos
77
78 #endif // CHROME_BROWSER_CHROMEOS_WEBUI_LOGIN_LOGIN_CONTAINER_UI_H_
OLDNEW
« no previous file with comments | « chrome/browser/browser_resources.grd ('k') | chrome/browser/chromeos/webui/login/login_container_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698