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

Side by Side Diff: chrome/browser/chromeos/ui/inline_login_dialog.cc

Issue 1457683002: Remove Chrome OS Mirror UI. Part 2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « chrome/browser/chromeos/ui/inline_login_dialog.h ('k') | chrome/chrome_browser_chromeos.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 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/ui/inline_login_dialog.h"
6
7 #include "base/bind.h"
8 #include "base/logging.h"
9 #include "chrome/browser/signin/signin_promo.h"
10 #include "chrome/browser/ui/browser_dialogs.h"
11 #include "content/public/browser/web_contents.h"
12 #include "ui/views/controls/webview/webview.h"
13 #include "ui/views/layout/box_layout.h"
14 #include "ui/views/widget/widget.h"
15
16 namespace {
17
18 const int kGaiaViewHeight = 400;
19 const int kGaiaViewWidth = 360;
20
21 } // namespace
22
23 namespace ui {
24
25 // static
26 void InlineLoginDialog::Show(content::BrowserContext* context) {
27 InlineLoginDialog* dialog = new InlineLoginDialog();
28 chrome::ShowWebDialog(NULL, context, dialog);
29 }
30
31 InlineLoginDialog::InlineLoginDialog() {
32 }
33
34 InlineLoginDialog::~InlineLoginDialog() {
35 }
36
37 ModalType InlineLoginDialog::GetDialogModalType() const {
38 return MODAL_TYPE_SYSTEM;
39 }
40
41 base::string16 InlineLoginDialog::GetDialogTitle() const {
42 return base::string16();
43 }
44
45 GURL InlineLoginDialog::GetDialogContentURL() const {
46 return GURL(signin::GetPromoURL(
47 signin_metrics::SOURCE_AVATAR_BUBBLE_ADD_ACCOUNT,
48 false /* auto_close */,
49 true /* is_constrained */));
50 }
51
52 void InlineLoginDialog::GetWebUIMessageHandlers(
53 std::vector<content::WebUIMessageHandler*>* handlers) const {
54 }
55
56 void InlineLoginDialog::GetDialogSize(gfx::Size* size) const {
57 *size = gfx::Size(kGaiaViewWidth, kGaiaViewHeight);
58 }
59
60 std::string InlineLoginDialog::GetDialogArgs() const {
61 return "";
62 }
63
64 bool InlineLoginDialog::CanResizeDialog() const {
65 return false;
66 }
67
68 void InlineLoginDialog::OnDialogClosed(const std::string& json_retval) {
69 delete this;
70 }
71
72 void InlineLoginDialog::OnCloseContents(content::WebContents* source,
73 bool* out_close_dialog) {
74 *out_close_dialog = true;
75 }
76
77 bool InlineLoginDialog::ShouldShowDialogTitle() const {
78 return true;
79 }
80
81 } // namespace ui
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/ui/inline_login_dialog.h ('k') | chrome/chrome_browser_chromeos.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698