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/size.h"
14 void InlineLoginDialog::Show(Profile
* profile
) {
15 chrome::ShowWebDialog(NULL
, profile
, new InlineLoginDialog(profile
));
18 InlineLoginDialog::InlineLoginDialog(Profile
* profile
)
22 ui::ModalType
InlineLoginDialog::GetDialogModalType() const {
23 return ui::MODAL_TYPE_SYSTEM
;
26 string16
InlineLoginDialog::GetDialogTitle() const {
30 GURL
InlineLoginDialog::GetDialogContentURL() const {
31 return GURL(chrome::kChromeUIInlineLoginURL
);
34 void InlineLoginDialog::GetWebUIMessageHandlers(
35 std::vector
<content::WebUIMessageHandler
*>* handlers
) const {
38 void InlineLoginDialog::GetDialogSize(gfx::Size
* size
) const {
39 size
->SetSize(380, 290);
42 std::string
InlineLoginDialog::GetDialogArgs() const {
46 void InlineLoginDialog::OnDialogClosed(const std::string
& json_retval
) {
50 void InlineLoginDialog::OnCloseContents(
51 content::WebContents
* source
, bool* out_close_dialog
) {
53 *out_close_dialog
= true;
56 bool InlineLoginDialog::ShouldShowDialogTitle() const {
60 bool InlineLoginDialog::HandleContextMenu(
61 const content::ContextMenuParams
& params
) {