Chromium Code Reviews| Index: chrome/browser/ui/views/conflicting_module_view_win.h |
| diff --git a/chrome/browser/ui/views/conflicting_module_view_win.h b/chrome/browser/ui/views/conflicting_module_view_win.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..25285dc92b45cfaa73be196ac2f6df4fcfeece6b |
| --- /dev/null |
| +++ b/chrome/browser/ui/views/conflicting_module_view_win.h |
| @@ -0,0 +1,76 @@ |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
|
sky
2013/06/03 22:58:00
2013
|
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_UI_VIEWS_EXTENSIONS_DISABLED_EXTENSIONS_VIEW_WIN_H_ |
|
sky
2013/06/03 22:58:00
Looks like you copied this.
|
| +#define CHROME_BROWSER_UI_VIEWS_EXTENSIONS_DISABLED_EXTENSIONS_VIEW_WIN_H_ |
| + |
| +#include "content/public/browser/notification_observer.h" |
| +#include "content/public/browser/notification_registrar.h" |
| +#include "googleurl/src/gurl.h" |
| +#include "ui/views/bubble/bubble_delegate.h" |
| +#include "ui/views/controls/button/button.h" |
| + |
| +class Browser; |
| + |
| +namespace views { |
| +class Label; |
| +class LabelButton; |
| +} |
| + |
| +// This is the class that implements the UI for the bubble showing that there |
| +// is a 3rd party module loaded that conflicts with Google Chrome. |
|
sky
2013/06/03 22:58:00
Remove 'Google' from here.
|
| +class ConflictingModuleView : public views::BubbleDelegateView, |
| + public views::ButtonListener, |
| + public content::NotificationObserver { |
| + public: |
| + ConflictingModuleView(views::View* anchor_view, |
| + Browser* browser, |
| + const GURL& help_center_url); |
| + |
| + // Show the Disabled Extension bubble, if needed. |
| + static void MaybeShow(Browser* browser, views::View* anchor_view); |
| + |
| + private: |
| + virtual ~ConflictingModuleView(); |
| + |
| + // Shows the bubble and updates the counter for how often it has been shown. |
| + void ShowBubble(); |
| + |
| + // Dismiss and make sure the bubble is not shown again. This bubble is a |
| + // single-appearance bubble. |
| + void DismissBubble(); |
| + |
| + // views::BubbleDelegateView overrides: |
| + virtual void Init() OVERRIDE; |
| + |
| + // views::ButtonListener implementation. |
| + virtual void ButtonPressed(views::Button* sender, |
| + const ui::Event& event) OVERRIDE; |
| + |
| + // views::View implementation. |
| + virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; |
| + virtual void ViewHierarchyChanged( |
| + const ViewHierarchyChangedDetails& details) OVERRIDE; |
| + |
| + void Observe( |
|
sky
2013/06/03 22:58:00
virtual void OVERRIDE?
|
| + int type, |
| + const content::NotificationSource& source, |
| + const content::NotificationDetails& details); |
| + |
| + Browser* browser_; |
| + |
| + content::NotificationRegistrar registrar_; |
| + |
| + // The headline, labels and buttons on the bubble. |
| + views::Label* explanation_; |
| + views::LabelButton* learn_more_button_; |
| + views::LabelButton* not_now_button_; |
| + |
| + // The link to the help center for this conflict. |
| + GURL help_center_url_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(ConflictingModuleView); |
| +}; |
| + |
| +#endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_DISABLED_EXTENSIONS_VIEW_H_ |