| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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_UI_VIEWS_PROFILES_PROFILE_RESET_BUBBLE_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_PROFILES_PROFILE_RESET_BUBBLE_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_PROFILES_PROFILE_RESET_BUBBLE_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_PROFILES_PROFILE_RESET_BUBBLE_VIEW_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 class ProfileResetBubbleView : public views::BubbleDelegateView, | 37 class ProfileResetBubbleView : public views::BubbleDelegateView, |
| 38 public views::ButtonListener, | 38 public views::ButtonListener, |
| 39 public views::LinkListener, | 39 public views::LinkListener, |
| 40 public GlobalErrorBubbleViewBase { | 40 public GlobalErrorBubbleViewBase { |
| 41 public: | 41 public: |
| 42 static ProfileResetBubbleView* ShowBubble( | 42 static ProfileResetBubbleView* ShowBubble( |
| 43 const base::WeakPtr<ProfileResetGlobalError>& global_error, | 43 const base::WeakPtr<ProfileResetGlobalError>& global_error, |
| 44 Browser* browser); | 44 Browser* browser); |
| 45 | 45 |
| 46 // views::BubbleDelegateView methods. | 46 // views::BubbleDelegateView methods. |
| 47 virtual views::View* GetInitiallyFocusedView() OVERRIDE; | 47 virtual views::View* GetInitiallyFocusedView() override; |
| 48 virtual void Init() OVERRIDE; | 48 virtual void Init() override; |
| 49 | 49 |
| 50 // views::WidgetDelegate method. | 50 // views::WidgetDelegate method. |
| 51 virtual void WindowClosing() OVERRIDE; | 51 virtual void WindowClosing() override; |
| 52 | 52 |
| 53 // GlobalErrorBubbleViewBase: | 53 // GlobalErrorBubbleViewBase: |
| 54 virtual void CloseBubbleView() OVERRIDE; | 54 virtual void CloseBubbleView() override; |
| 55 | 55 |
| 56 private: | 56 private: |
| 57 ProfileResetBubbleView( | 57 ProfileResetBubbleView( |
| 58 const base::WeakPtr<ProfileResetGlobalError>& global_error, | 58 const base::WeakPtr<ProfileResetGlobalError>& global_error, |
| 59 views::View* anchor_view, | 59 views::View* anchor_view, |
| 60 content::PageNavigator* navigator, | 60 content::PageNavigator* navigator, |
| 61 Profile* profile); | 61 Profile* profile); |
| 62 | 62 |
| 63 virtual ~ProfileResetBubbleView(); | 63 virtual ~ProfileResetBubbleView(); |
| 64 | 64 |
| 65 // Reset all child views members and remove children from view hierarchy. | 65 // Reset all child views members and remove children from view hierarchy. |
| 66 void ResetAllChildren(); | 66 void ResetAllChildren(); |
| 67 | 67 |
| 68 // Sets up the layout manager and set the report checkbox to the value passed | 68 // Sets up the layout manager and set the report checkbox to the value passed |
| 69 // in |report_checked|. | 69 // in |report_checked|. |
| 70 void SetupLayoutManager(bool report_checked); | 70 void SetupLayoutManager(bool report_checked); |
| 71 | 71 |
| 72 // views::ButtonListener method. | 72 // views::ButtonListener method. |
| 73 virtual void ButtonPressed(views::Button* sender, | 73 virtual void ButtonPressed(views::Button* sender, |
| 74 const ui::Event& event) OVERRIDE; | 74 const ui::Event& event) override; |
| 75 | 75 |
| 76 // views::LinkListener method. | 76 // views::LinkListener method. |
| 77 virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE; | 77 virtual void LinkClicked(views::Link* source, int event_flags) override; |
| 78 | 78 |
| 79 // Sets the fully populated feedback data. | 79 // Sets the fully populated feedback data. |
| 80 void UpdateFeedbackDetails(); | 80 void UpdateFeedbackDetails(); |
| 81 | 81 |
| 82 struct Controls { | 82 struct Controls { |
| 83 Controls() { | 83 Controls() { |
| 84 Reset(); | 84 Reset(); |
| 85 } | 85 } |
| 86 void Reset() { | 86 void Reset() { |
| 87 reset_button = NULL; | 87 reset_button = NULL; |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 // show the help pane or not. | 129 // show the help pane or not. |
| 130 bool show_help_pane_; | 130 bool show_help_pane_; |
| 131 | 131 |
| 132 // To cancel pending callbacks after destruction. | 132 // To cancel pending callbacks after destruction. |
| 133 base::WeakPtrFactory<ProfileResetBubbleView> weak_factory_; | 133 base::WeakPtrFactory<ProfileResetBubbleView> weak_factory_; |
| 134 | 134 |
| 135 DISALLOW_COPY_AND_ASSIGN(ProfileResetBubbleView); | 135 DISALLOW_COPY_AND_ASSIGN(ProfileResetBubbleView); |
| 136 }; | 136 }; |
| 137 | 137 |
| 138 #endif // CHROME_BROWSER_UI_VIEWS_PROFILES_PROFILE_RESET_BUBBLE_VIEW_H_ | 138 #endif // CHROME_BROWSER_UI_VIEWS_PROFILES_PROFILE_RESET_BUBBLE_VIEW_H_ |
| OLD | NEW |