Add ICU message format support
[chromium-blink-merge.git] / chrome / browser / ui / tab_dialogs.h
blob165501325a51a7b7cf024e1c04090867aa7ef3f6
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.
5 #ifndef CHROME_BROWSER_UI_TAB_DIALOGS_H_
6 #define CHROME_BROWSER_UI_TAB_DIALOGS_H_
8 #include <string>
10 #include "base/memory/scoped_ptr.h"
11 #include "base/strings/string16.h"
12 #include "base/supports_user_data.h"
13 #include "chrome/browser/ui/validation_message_bubble.h"
14 #include "ui/gfx/native_widget_types.h"
16 class Browser;
17 class Profile;
19 namespace content {
20 class WebContents;
23 namespace gfx {
24 class Rect;
27 namespace ui {
28 class ProfileSigninConfirmationDelegate;
31 // A cross-platform interface for invoking various tab modal dialogs/bubbles.
32 class TabDialogs : public base::SupportsUserData::Data {
33 public:
34 ~TabDialogs() override {}
36 // Creates a platform specific instance, and attaches it to |contents|.
37 // If an instance is already attached, does nothing.
38 static void CreateForWebContents(content::WebContents* contents);
40 // Returns the instance that was attached to |contents|.
41 // If no instance was attached, returns NULL.
42 static TabDialogs* FromWebContents(content::WebContents* contents);
44 // Returns the parent view to use when showing a tab modal dialog.
45 virtual gfx::NativeView GetDialogParentView() const = 0;
47 // Shows the collected cookies dialog box.
48 virtual void ShowCollectedCookies() = 0;
50 // Shows or hides the hung renderer dialog.
51 virtual void ShowHungRendererDialog() = 0;
52 virtual void HideHungRendererDialog() = 0;
54 // Shows a dialog asking the user to confirm linking to a managed account.
55 virtual void ShowProfileSigninConfirmation(
56 Browser* browser,
57 Profile* profile,
58 const std::string& username,
59 ui::ProfileSigninConfirmationDelegate* delegate) = 0;
61 // Shows or hides the ManagePasswords bubble.
62 // Pass true for |user_action| if this is a user initiated action.
63 virtual void ShowManagePasswordsBubble(bool user_action) = 0;
64 virtual void HideManagePasswordsBubble() = 0;
66 virtual scoped_ptr<ValidationMessageBubble> ShowValidationMessage(
67 const gfx::Rect& anchor_in_root_view,
68 const base::string16& main_text,
69 const base::string16& sub_text) = 0;
71 protected:
72 static const void* UserDataKey();
75 #endif // CHROME_BROWSER_UI_TAB_DIALOGS_H_