ozone: evdev: Sync caps lock LED state to evdev
[chromium-blink-merge.git] / chrome / browser / ui / tab_dialogs.h
blobf48f6da0b3081d1715b1d5b14d43e02f32eeddd3
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"
15 class Browser;
16 class Profile;
18 namespace content {
19 class WebContents;
22 namespace gfx {
23 class Rect;
26 namespace ui {
27 class ProfileSigninConfirmationDelegate;
30 // A cross-platform interface for invoking various tab modal dialogs/bubbles.
31 class TabDialogs : public base::SupportsUserData::Data {
32 public:
33 ~TabDialogs() override {}
35 // Creates a platform specific instance, and attaches it to |contents|.
36 // If an instance is already attached, does nothing.
37 static void CreateForWebContents(content::WebContents* contents);
39 // Returns the instance that was attached to |contents|.
40 // If no instance was attached, returns NULL.
41 static TabDialogs* FromWebContents(content::WebContents* contents);
43 // Shows the collected cookies dialog box.
44 virtual void ShowCollectedCookies() = 0;
46 // Shows or hides the hung renderer dialog.
47 virtual void ShowHungRendererDialog() = 0;
48 virtual void HideHungRendererDialog() = 0;
50 // Shows a dialog asking the user to confirm linking to a managed account.
51 virtual void ShowProfileSigninConfirmation(
52 Browser* browser,
53 Profile* profile,
54 const std::string& username,
55 ui::ProfileSigninConfirmationDelegate* delegate) = 0;
57 // Shows or hides the ManagePasswords bubble.
58 // Pass true for |user_action| if this is a user initiated action.
59 virtual void ShowManagePasswordsBubble(bool user_action) = 0;
60 virtual void HideManagePasswordsBubble() = 0;
62 virtual scoped_ptr<ValidationMessageBubble> ShowValidationMessage(
63 const gfx::Rect& anchor_in_root_view,
64 const base::string16& main_text,
65 const base::string16& sub_text) = 0;
67 protected:
68 static const void* UserDataKey();
71 #endif // CHROME_BROWSER_UI_TAB_DIALOGS_H_