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

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: changes made in response to Oshima's and Nikita's comments 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
9 #include <string>
10
11 #include "base/scoped_ptr.h"
12 #include "chrome/browser/chromeos/webui/login/login_ui_helpers.h"
13 #include "chrome/browser/webui/chrome_url_data_manager.h"
14 #include "chrome/browser/webui/web_ui.h"
15
16 class Profile;
17
18 namespace chromeos {
19
20 class BrowserOperationsInterface;
21 class ProfileOperationsInterface;
22
23 // Boilerplate class that is used to associate the LoginContainerUI code with
24 // the URL "chrome://login-container"
25 class LoginContainerUIHTMLSource : public ChromeURLDataManager::DataSource {
26 public:
27 explicit LoginContainerUIHTMLSource(MessageLoop* message_loop);
28
29 virtual void StartDataRequest(const std::string& path,
30 bool is_off_the_record,
31 int request_id);
32 virtual std::string GetMimeType(const std::string&) const {
33 return "text/html";
34 }
35
36 private:
37 scoped_ptr<HTMLOperationsInterface> html_operations_;
38
39 DISALLOW_COPY_AND_ASSIGN(LoginContainerUIHTMLSource);
40 };
41
42 // Main LoginContainerUI handling function. It handles the WebUI hooks that are
43 // supplied for the page to launch the login container.
44 class LoginContainerUIHandler : public WebUIMessageHandler {
45 public:
46 LoginContainerUIHandler();
47 virtual ~LoginContainerUIHandler();
48
49 // WebUIMessageHandler implementation.
50 virtual WebUIMessageHandler* Attach(WebUI* web_ui);
51 virtual void RegisterMessages();
52
53 void HandleOpenLoginScreen(const ListValue* args);
54
55 private:
56 scoped_ptr<BrowserOperationsInterface> browser_operations_;
57 scoped_ptr<ProfileOperationsInterface> profile_operations_;
58
59 DISALLOW_COPY_AND_ASSIGN(LoginContainerUIHandler);
60 };
61
62 // Boilerplate class that is used to associate the LoginContainerUI code with
63 // the Webui code.
64 class LoginContainerUI : public WebUI {
65 public:
66 explicit LoginContainerUI(TabContents* contents);
67
68 // Return the URL for a given search term.
69 static const GURL GetLoginURLWithSearchText(const string16& text);
70
71 static RefCountedMemory* GetFaviconResourceBytes();
72
73 private:
74 DISALLOW_COPY_AND_ASSIGN(LoginContainerUI);
75 };
76
77 } // namespace chromeos
78
79 #endif // CHROME_BROWSER_CHROMEOS_WEBUI_LOGIN_LOGIN_CONTAINER_UI_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698