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

Unified Diff: chrome/browser/chromeos/webui/login/login_container_ui.h

Issue 6577003: Entire DOMBrowser stack (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/webui/login/login_container_ui.h
diff --git a/chrome/browser/chromeos/webui/login/login_container_ui.h b/chrome/browser/chromeos/webui/login/login_container_ui.h
new file mode 100644
index 0000000000000000000000000000000000000000..6f027622a6842f59f5ffdeaec287262c758f8da2
--- /dev/null
+++ b/chrome/browser/chromeos/webui/login/login_container_ui.h
@@ -0,0 +1,80 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_CHROMEOS_WEBUI_LOGIN_LOGIN_CONTAINER_UI_H_
+#define CHROME_BROWSER_CHROMEOS_WEBUI_LOGIN_LOGIN_CONTAINER_UI_H_
+#pragma once
+
+#include <string>
+
+#include "base/scoped_ptr.h"
+#include "chrome/browser/chromeos/webui/login/login_ui_helpers.h"
+#include "chrome/browser/webui/chrome_url_data_manager.h"
+#include "chrome/browser/webui/web_ui.h"
+#include "views/widget/widget.h"
+
+class Profile;
+
+namespace chromeos {
+
+class BrowserOperationsInterface;
+class ProfileOperationsInterface;
+
+// Boilerplate class that is used to associate the LoginContainerUI code with
+// the URL "chrome://login-container"
+class LoginContainerUIHTMLSource : public ChromeURLDataManager::DataSource {
+ public:
+ explicit LoginContainerUIHTMLSource(MessageLoop* message_loop);
+
+ virtual void StartDataRequest(const std::string& path,
+ bool is_off_the_record,
+ int request_id);
+ virtual std::string GetMimeType(const std::string&) const {
+ return "text/html";
+ }
+
+ private:
+ scoped_ptr<HTMLOperationsInterface> html_operations_;
+
+ DISALLOW_COPY_AND_ASSIGN(LoginContainerUIHTMLSource);
+};
+
+// Main LoginContainerUI handling function. It handles the WebUI hooks that are
+// supplied for the page to launch the login container.
+class LoginContainerUIHandler : public WebUIMessageHandler {
+ public:
+ LoginContainerUIHandler();
+ ~LoginContainerUIHandler();
+
+ // WebUIMessageHandler implementation.
+ virtual WebUIMessageHandler* Attach(WebUI* web_ui);
+ virtual void RegisterMessages();
+
+ void HandleOpenLoginScreen(const ListValue* args);
+
+ private:
+ scoped_ptr<BrowserOperationsInterface> browser_operations_;
+ scoped_ptr<ProfileOperationsInterface> profile_operations_;
+
+ DISALLOW_COPY_AND_ASSIGN(LoginContainerUIHandler);
+};
+
+// Boilerplate class that is used to associate the LoginContainerUI code with
+// the Webui code.
+class LoginContainerUI : public WebUI {
+ public:
+ explicit LoginContainerUI(TabContents* contents);
+
+ // Return the URL for a given search term.
+ static const GURL GetLoginURLWithSearchText(const string16& text);
+
+ static RefCountedMemory* GetFaviconResourceBytes();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(LoginContainerUI);
+};
+
+} // namespace chromeos
+
+#endif // CHROME_BROWSER_CHROMEOS_WEBUI_LOGIN_LOGIN_CONTAINER_UI_H_

Powered by Google App Engine
This is Rietveld 408576698