Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
|
sky
2013/06/03 22:58:00
2013
| |
| 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_WIN_H_ | |
|
sky
2013/06/03 22:58:00
Looks like you copied this.
| |
| 6 #define CHROME_BROWSER_UI_VIEWS_EXTENSIONS_DISABLED_EXTENSIONS_VIEW_WIN_H_ | |
| 7 | |
| 8 #include "content/public/browser/notification_observer.h" | |
| 9 #include "content/public/browser/notification_registrar.h" | |
| 10 #include "googleurl/src/gurl.h" | |
| 11 #include "ui/views/bubble/bubble_delegate.h" | |
| 12 #include "ui/views/controls/button/button.h" | |
| 13 | |
| 14 class Browser; | |
| 15 | |
| 16 namespace views { | |
| 17 class Label; | |
| 18 class LabelButton; | |
| 19 } | |
| 20 | |
| 21 // This is the class that implements the UI for the bubble showing that there | |
| 22 // is a 3rd party module loaded that conflicts with Google Chrome. | |
|
sky
2013/06/03 22:58:00
Remove 'Google' from here.
| |
| 23 class ConflictingModuleView : public views::BubbleDelegateView, | |
| 24 public views::ButtonListener, | |
| 25 public content::NotificationObserver { | |
| 26 public: | |
| 27 ConflictingModuleView(views::View* anchor_view, | |
| 28 Browser* browser, | |
| 29 const GURL& help_center_url); | |
| 30 | |
| 31 // Show the Disabled Extension bubble, if needed. | |
| 32 static void MaybeShow(Browser* browser, views::View* anchor_view); | |
| 33 | |
| 34 private: | |
| 35 virtual ~ConflictingModuleView(); | |
| 36 | |
| 37 // Shows the bubble and updates the counter for how often it has been shown. | |
| 38 void ShowBubble(); | |
| 39 | |
| 40 // Dismiss and make sure the bubble is not shown again. This bubble is a | |
| 41 // single-appearance bubble. | |
| 42 void DismissBubble(); | |
| 43 | |
| 44 // views::BubbleDelegateView overrides: | |
| 45 virtual void Init() OVERRIDE; | |
| 46 | |
| 47 // views::ButtonListener implementation. | |
| 48 virtual void ButtonPressed(views::Button* sender, | |
| 49 const ui::Event& event) OVERRIDE; | |
| 50 | |
| 51 // views::View implementation. | |
| 52 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; | |
| 53 virtual void ViewHierarchyChanged( | |
| 54 const ViewHierarchyChangedDetails& details) OVERRIDE; | |
| 55 | |
| 56 void Observe( | |
|
sky
2013/06/03 22:58:00
virtual void OVERRIDE?
| |
| 57 int type, | |
| 58 const content::NotificationSource& source, | |
| 59 const content::NotificationDetails& details); | |
| 60 | |
| 61 Browser* browser_; | |
| 62 | |
| 63 content::NotificationRegistrar registrar_; | |
| 64 | |
| 65 // The headline, labels and buttons on the bubble. | |
| 66 views::Label* explanation_; | |
| 67 views::LabelButton* learn_more_button_; | |
| 68 views::LabelButton* not_now_button_; | |
| 69 | |
| 70 // The link to the help center for this conflict. | |
| 71 GURL help_center_url_; | |
| 72 | |
| 73 DISALLOW_COPY_AND_ASSIGN(ConflictingModuleView); | |
| 74 }; | |
| 75 | |
| 76 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_DISABLED_EXTENSIONS_VIEW_H_ | |
| OLD | NEW |