Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / views / outdated_upgrade_bubble_view.h
index 7a66a69..b1951aa 100644 (file)
@@ -8,6 +8,8 @@
 #include "ui/views/bubble/bubble_delegate.h"
 #include "ui/views/controls/button/button.h"
 
+class ElevationIconSetter;
+
 namespace views {
 class LabelButton;
 }
@@ -24,31 +26,32 @@ class OutdatedUpgradeBubbleView : public views::BubbleDelegateView,
                                   public views::ButtonListener {
  public:
   static void ShowBubble(views::View* anchor_view,
-                         content::PageNavigator* navigator);
+                         content::PageNavigator* navigator,
+                         bool auto_update_enabled);
 
   // Identifies if we are running a build that supports the
   // outdated upgrade bubble view.
   static bool IsAvailable();
 
   // views::BubbleDelegateView method.
-  virtual views::View* GetInitiallyFocusedView() OVERRIDE;
+  views::View* GetInitiallyFocusedView() override;
 
   // views::WidgetDelegate method.
-  virtual void WindowClosing() OVERRIDE;
+  void WindowClosing() override;
 
  private:
   OutdatedUpgradeBubbleView(views::View* anchor_view,
-                            content::PageNavigator* navigator);
-  virtual ~OutdatedUpgradeBubbleView();
+                            content::PageNavigator* navigator,
+                            bool auto_update_enabled);
+  ~OutdatedUpgradeBubbleView() override;
 
   static bool IsShowing() { return upgrade_bubble_ != NULL; }
 
   // views::BubbleDelegateView method.
-  virtual void Init() OVERRIDE;
+  void Init() override;
 
   // views::ButtonListener method.
-  virtual void ButtonPressed(views::Button* sender,
-                             const ui::Event& event) OVERRIDE;
+  void ButtonPressed(views::Button* sender, const ui::Event& event) override;
 
   // Handle the message when the user presses a button.
   void HandleButtonPressed(views::Button* sender);
@@ -60,11 +63,16 @@ class OutdatedUpgradeBubbleView : public views::BubbleDelegateView,
   // reinstall.
   static int num_ignored_bubbles_;
 
-  // Identifies if the reinstall button was hit before closing the bubble.
-  bool chose_to_reinstall_;
+  // Identifies if auto-update is enabled or not.
+  bool auto_update_enabled_;
+
+  // Identifies if the accept button was hit before closing the bubble.
+  bool accepted_;
 
-  // Button that takes the user to the Chrome download page.
-  views::LabelButton* reinstall_button_;
+  // Button that lets the user accept the proposal, which is to navigate to a
+  // Chrome download page when |auto_update_enabled_| is true, or attempt to
+  // re-enable auto-update otherwise.
+  views::LabelButton* accept_button_;
 
   // Button for the user to be reminded later about the outdated upgrade.
   views::LabelButton* later_button_;
@@ -72,6 +80,8 @@ class OutdatedUpgradeBubbleView : public views::BubbleDelegateView,
   // The PageNavigator to use for opening the Download Chrome URL.
   content::PageNavigator* navigator_;
 
+  scoped_ptr<ElevationIconSetter> elevation_icon_setter_;
+
   DISALLOW_COPY_AND_ASSIGN(OutdatedUpgradeBubbleView);
 };