OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_BLOCKED_PLUGIN_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_BLOCKED_PLUGIN_MANAGER_H_ |
6 #define CHROME_BROWSER_BLOCKED_PLUGIN_MANAGER_H_ | 6 #define CHROME_BROWSER_BLOCKED_PLUGIN_MANAGER_H_ |
7 | 7 |
8 #include "chrome/browser/renderer_host/render_view_host_delegate.h" | 8 #include "chrome/browser/renderer_host/render_view_host_delegate.h" |
9 #include "chrome/browser/tab_contents/infobar_delegate.h" | 9 #include "chrome/browser/tab_contents/infobar_delegate.h" |
10 | 10 |
11 class TabContents; | 11 class TabContents; |
12 | 12 |
13 class BlockedPluginManager : public RenderViewHostDelegate::BlockedPlugin, | 13 class BlockedPluginManager : public RenderViewHostDelegate::BlockedPlugin, |
14 public ConfirmInfoBarDelegate { | 14 public ConfirmInfoBarDelegate { |
15 public: | 15 public: |
16 explicit BlockedPluginManager(TabContents* tab_contents); | 16 explicit BlockedPluginManager(TabContents* tab_contents); |
17 | 17 |
18 virtual void OnNonSandboxedPluginBlocked(const string16& name); | 18 virtual void OnNonSandboxedPluginBlocked(const string16& name); |
19 virtual void OnBlockedPluginLoaded(); | 19 virtual void OnBlockedPluginLoaded(); |
20 | 20 |
21 // ConfirmInfoBarDelegate methods | 21 // ConfirmInfoBarDelegate methods |
22 virtual int GetButtons() const; | 22 virtual int GetButtons() const; |
23 virtual std::wstring GetButtonLabel(InfoBarButton button) const; | 23 virtual string16 GetButtonLabel(InfoBarButton button) const; |
24 virtual std::wstring GetMessageText() const; | 24 virtual string16 GetMessageText() const; |
25 virtual std::wstring GetLinkText(); | 25 virtual string16 GetLinkText(); |
26 virtual SkBitmap* GetIcon() const; | 26 virtual SkBitmap* GetIcon() const; |
27 virtual bool Accept(); | 27 virtual bool Accept(); |
28 virtual bool LinkClicked(WindowOpenDisposition disposition); | 28 virtual bool LinkClicked(WindowOpenDisposition disposition); |
29 | 29 |
30 private: | 30 private: |
31 // Owns us. | 31 // Owns us. |
32 TabContents* tab_contents_; | 32 TabContents* tab_contents_; |
33 string16 name_; | 33 string16 name_; |
34 }; | 34 }; |
35 | 35 |
36 #endif // CHROME_BROWSER_BLOCKED_PLUGIN_MANAGER_H_ | 36 #endif // CHROME_BROWSER_BLOCKED_PLUGIN_MANAGER_H_ |
OLD | NEW |