Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / ui / views / location_bar / open_pdf_in_reader_view.h
blob867e8d89100f9a3ead33a7f50af50c63a2809e99
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.
5 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_OPEN_PDF_IN_READER_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_OPEN_PDF_IN_READER_VIEW_H_
8 #include "ui/views/controls/image_view.h"
9 #include "ui/views/widget/widget_observer.h"
11 class LocationBarView;
12 class OpenPDFInReaderBubbleView;
13 class OpenPDFInReaderPromptDelegate;
15 namespace content {
16 class WebContents;
19 // A Page Action image view for the "Open PDF in Reader" bubble.
20 class OpenPDFInReaderView : public views::ImageView,
21 public views::WidgetObserver {
22 public:
23 explicit OpenPDFInReaderView(LocationBarView* location_bar_view);
24 virtual ~OpenPDFInReaderView();
26 void Update(content::WebContents* web_contents);
28 private:
29 void ShowBubble();
31 // views::ImageView:
32 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
33 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE;
34 virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE;
35 virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE;
37 // views::WidgetObserver:
38 virtual void OnWidgetDestroying(views::Widget* widget) OVERRIDE;
40 // The LocationBarView hosting this view.
41 LocationBarView* location_bar_view_;
43 OpenPDFInReaderBubbleView* bubble_;
45 // Weak pointer; owned by the PDFTabHelper of the currently active tab.
46 OpenPDFInReaderPromptDelegate* model_;
48 DISALLOW_COPY_AND_ASSIGN(OpenPDFInReaderView);
51 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_OPEN_PDF_IN_READER_VIEW_H_