Add new certificateProvider extension API.
[chromium-blink-merge.git] / chrome / browser / ui / sync / inline_login_dialog.cc
blobdfd056dcab21cbab09d4f5af783ce6d324244950
1 // Copyright 2013 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.
5 #include "chrome/browser/ui/sync/inline_login_dialog.h"
7 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/browser/ui/browser_dialogs.h"
9 #include "chrome/common/url_constants.h"
10 #include "ui/gfx/geometry/size.h"
11 #include "url/gurl.h"
13 // static
14 void InlineLoginDialog::Show(Profile* profile) {
15 chrome::ShowWebDialog(NULL, profile, new InlineLoginDialog());
18 InlineLoginDialog::InlineLoginDialog() {
21 ui::ModalType InlineLoginDialog::GetDialogModalType() const {
22 return ui::MODAL_TYPE_SYSTEM;
25 base::string16 InlineLoginDialog::GetDialogTitle() const {
26 return base::string16();
29 GURL InlineLoginDialog::GetDialogContentURL() const {
30 return GURL(chrome::kChromeUIChromeSigninURL);
33 void InlineLoginDialog::GetWebUIMessageHandlers(
34 std::vector<content::WebUIMessageHandler*>* handlers) const {
37 void InlineLoginDialog::GetDialogSize(gfx::Size* size) const {
38 size->SetSize(380, 290);
41 std::string InlineLoginDialog::GetDialogArgs() const {
42 return "[]";
45 void InlineLoginDialog::OnDialogClosed(const std::string& json_retval) {
46 delete this;
49 void InlineLoginDialog::OnCloseContents(
50 content::WebContents* source, bool* out_close_dialog) {
51 *out_close_dialog = true;
54 bool InlineLoginDialog::ShouldShowDialogTitle() const {
55 return false;
58 bool InlineLoginDialog::HandleContextMenu(
59 const content::ContextMenuParams& params) {
60 return true;