Add a minor text member to ui::MenuModel.
[chromium-blink-merge.git] / chrome / browser / ui / sync / inline_login_dialog.cc
blob73c9eebc1602bf01a6457a32c549b1af1b9504dd
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"
11 #include "url/gurl.h"
13 // static
14 void InlineLoginDialog::Show(Profile* profile) {
15 chrome::ShowWebDialog(NULL, profile, new InlineLoginDialog(profile));
18 InlineLoginDialog::InlineLoginDialog(Profile* profile)
19 : profile_(profile) {
22 ui::ModalType InlineLoginDialog::GetDialogModalType() const {
23 return ui::MODAL_TYPE_SYSTEM;
26 string16 InlineLoginDialog::GetDialogTitle() const {
27 return string16();
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 {
43 return "[]";
46 void InlineLoginDialog::OnDialogClosed(const std::string& json_retval) {
47 delete this;
50 void InlineLoginDialog::OnCloseContents(
51 content::WebContents* source, bool* out_close_dialog) {
52 if (out_close_dialog)
53 *out_close_dialog = true;
56 bool InlineLoginDialog::ShouldShowDialogTitle() const {
57 return false;
60 bool InlineLoginDialog::HandleContextMenu(
61 const content::ContextMenuParams& params) {
62 return true;