| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2012 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. |
| 4 |
| 5 #ifndef CHROME_BROWSER_UI_VIEWS_EXTENSIONS_DISABLED_EXTENSIONS_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_EXTENSIONS_DISABLED_EXTENSIONS_VIEW_H_ |
| 7 |
| 8 #include "ui/views/bubble/bubble_delegate.h" |
| 9 #include "ui/views/controls/button/button.h" |
| 10 #include "ui/views/controls/link_listener.h" |
| 11 #include "chrome/common/extensions/extension_set.h" |
| 12 |
| 13 class Browser; |
| 14 |
| 15 namespace views { |
| 16 class Label; |
| 17 class Link; |
| 18 class NativeTextButton; |
| 19 } |
| 20 |
| 21 // This is the class that implements the UI for the bubble showing which |
| 22 // extensions have been automatically disabled by the sideload-wipeout |
| 23 // initiative. |
| 24 class DisabledExtensionsView : public views::BubbleDelegateView, |
| 25 public views::ButtonListener, |
| 26 public views::LinkListener { |
| 27 public: |
| 28 DisabledExtensionsView(views::View* anchor_view, |
| 29 Browser* browser, |
| 30 const ExtensionSet* wiped_out); |
| 31 |
| 32 // Show the Disabled Extension bubble, if needed. Returns true if the bubble |
| 33 // was shown. |
| 34 static bool MaybeShow(Browser* browser, views::View* anchor_view); |
| 35 |
| 36 protected: |
| 37 // views::BubbleDelegateView overrides: |
| 38 virtual void Init() OVERRIDE; |
| 39 |
| 40 private: |
| 41 virtual ~DisabledExtensionsView(); |
| 42 |
| 43 // views::ButtonListener implementation. |
| 44 virtual void ButtonPressed(views::Button* sender, |
| 45 const ui::Event& event) OVERRIDE; |
| 46 |
| 47 // views::LinkListener implementation. |
| 48 void LinkClicked(views::Link* source, int event_flags) OVERRIDE; |
| 49 |
| 50 // views::View implementation. |
| 51 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; |
| 52 virtual void ViewHierarchyChanged(bool is_add, |
| 53 View* parent, |
| 54 View* child) OVERRIDE; |
| 55 |
| 56 Browser* browser_; |
| 57 |
| 58 // The set of extensions that have been wiped out by sideload wipeout. |
| 59 scoped_ptr<const ExtensionSet> wiped_out_; |
| 60 |
| 61 // The headline and buttons on the bubble. |
| 62 views::Label* headline_; |
| 63 views::Link* learn_more_; |
| 64 views::NativeTextButton* settings_button_; |
| 65 views::NativeTextButton* dismiss_button_; |
| 66 |
| 67 DISALLOW_COPY_AND_ASSIGN(DisabledExtensionsView); |
| 68 }; |
| 69 |
| 70 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_DISABLED_EXTENSIONS_VIEW_H_ |
| OLD | NEW |