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_OPEN_PDF_IN_READER_BUBBLE_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_OPEN_PDF_IN_READER_BUBBLE_VIEW_H_
8 #include "ui/views/bubble/bubble_delegate.h"
9 #include "ui/views/controls/button/button.h"
10 #include "ui/views/controls/link_listener.h"
13 class OpenPDFInReaderPromptClient
;
20 class OpenPDFInReaderBubbleView
: public views::BubbleDelegateView
,
21 public views::ButtonListener
,
22 public views::LinkListener
{
24 OpenPDFInReaderBubbleView(views::View
* anchor_view
,
25 pdf::OpenPDFInReaderPromptClient
* model
);
26 ~OpenPDFInReaderBubbleView() override
;
29 // views::BubbleDelegateView:
32 // views::ButtonListener:
33 void ButtonPressed(views::Button
* sender
, const ui::Event
& event
) override
;
35 // views::LinkListener:
36 void LinkClicked(views::Link
* source
, int event_flags
) override
;
39 // Weak pointer; owned by the PDFWebContentsHelper of the currently active
41 pdf::OpenPDFInReaderPromptClient
* model_
;
43 views::Link
* open_in_reader_link_
;
44 views::LabelButton
* close_button_
;
46 DISALLOW_COPY_AND_ASSIGN(OpenPDFInReaderBubbleView
);
49 #endif // CHROME_BROWSER_UI_VIEWS_OPEN_PDF_IN_READER_BUBBLE_VIEW_H_