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

Side by Side Diff: chrome/browser/chromeos/login/login_html_dialog.cc

Issue 2675007: Add OOBE/login html dialog. (Closed) Base URL: git://codf21.jail/chromium.git
Patch Set: merge Created 10 years, 6 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/chromeos/login/login_html_dialog.h"
6
7 #include "chrome/browser/profile_manager.h"
8 #include "chrome/browser/views/browser_dialogs.h"
9 #include "gfx/native_widget_types.h"
10 #include "gfx/size.h"
11 #include "views/window/window.h"
12
13 namespace chromeos {
14
15 namespace {
16
17 const int kDefaultWidth = 800;
18 const int kDefaultHeight = 600;
19
20 } // namespace
21
22 ///////////////////////////////////////////////////////////////////////////////
23 // LoginHtmlDialog, public:
24
25 LoginHtmlDialog::LoginHtmlDialog(Delegate* delegate,
26 gfx::NativeWindow parent_window,
27 const std::wstring& title,
28 const GURL& url)
29 : delegate_(delegate),
30 parent_window_(parent_window),
31 title_(title),
32 url_(url) {
33 }
34
35 LoginHtmlDialog::~LoginHtmlDialog() {
36 delegate_ = NULL;
37 }
38
39 void LoginHtmlDialog::Show() {
40 browser::ShowHtmlDialogView(parent_window_,
41 ProfileManager::GetDefaultProfile(),
42 this);
43 }
44
45 ///////////////////////////////////////////////////////////////////////////////
46 // LoginHtmlDialog, protected:
47
48 void LoginHtmlDialog::OnDialogClosed(const std::string& json_retval) {
49 if (delegate_)
50 delegate_->OnDialogClosed();
51 }
52
53 void LoginHtmlDialog::OnCloseContents(TabContents* source,
54 bool* out_close_dialog) {
55 if (out_close_dialog)
56 *out_close_dialog = true;
57 }
58
59 void LoginHtmlDialog::GetDialogSize(gfx::Size* size) const {
60 size->SetSize(kDefaultWidth, kDefaultHeight);
61 }
62
63 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/login_html_dialog.h ('k') | chrome/browser/chromeos/login/new_user_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698