| OLD | NEW | 
|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 #include "chrome/browser/ui/views/open_pdf_in_reader_bubble_view.h" | 5 #include "chrome/browser/ui/views/open_pdf_in_reader_bubble_view.h" | 
| 6 | 6 | 
| 7 #include "chrome/browser/ui/pdf/open_pdf_in_reader_prompt_delegate.h" | 7 #include "components/pdf/browser/open_pdf_in_reader_prompt_delegate.h" | 
| 8 #include "ui/views/controls/button/label_button.h" | 8 #include "ui/views/controls/button/label_button.h" | 
| 9 #include "ui/views/controls/label.h" | 9 #include "ui/views/controls/label.h" | 
| 10 #include "ui/views/controls/link.h" | 10 #include "ui/views/controls/link.h" | 
| 11 #include "ui/views/controls/separator.h" | 11 #include "ui/views/controls/separator.h" | 
| 12 #include "ui/views/layout/grid_layout.h" | 12 #include "ui/views/layout/grid_layout.h" | 
| 13 #include "ui/views/layout/layout_constants.h" | 13 #include "ui/views/layout/layout_constants.h" | 
| 14 | 14 | 
| 15 OpenPDFInReaderBubbleView::~OpenPDFInReaderBubbleView() {} | 15 OpenPDFInReaderBubbleView::~OpenPDFInReaderBubbleView() {} | 
| 16 | 16 | 
| 17 OpenPDFInReaderBubbleView::OpenPDFInReaderBubbleView( | 17 OpenPDFInReaderBubbleView::OpenPDFInReaderBubbleView( | 
| 18     views::View* anchor_view, | 18     views::View* anchor_view, | 
| 19     OpenPDFInReaderPromptDelegate* model) | 19     pdf::OpenPDFInReaderPromptDelegate* model) | 
| 20     : views::BubbleDelegateView(anchor_view, views::BubbleBorder::TOP_RIGHT), | 20     : views::BubbleDelegateView(anchor_view, views::BubbleBorder::TOP_RIGHT), | 
| 21       model_(model), | 21       model_(model), | 
| 22       open_in_reader_link_(NULL), | 22       open_in_reader_link_(NULL), | 
| 23       close_button_(NULL) { | 23       close_button_(NULL) { | 
| 24   DCHECK(model); | 24   DCHECK(model); | 
| 25 } | 25 } | 
| 26 | 26 | 
| 27 void OpenPDFInReaderBubbleView::Init() { | 27 void OpenPDFInReaderBubbleView::Init() { | 
| 28   using views::GridLayout; | 28   using views::GridLayout; | 
| 29 | 29 | 
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 70 } | 70 } | 
| 71 | 71 | 
| 72 void OpenPDFInReaderBubbleView::LinkClicked(views::Link* source, | 72 void OpenPDFInReaderBubbleView::LinkClicked(views::Link* source, | 
| 73                                             int event_flags) { | 73                                             int event_flags) { | 
| 74   DCHECK_EQ(open_in_reader_link_, source); | 74   DCHECK_EQ(open_in_reader_link_, source); | 
| 75 | 75 | 
| 76   model_->Accept(); | 76   model_->Accept(); | 
| 77   GetWidget()->Close(); | 77   GetWidget()->Close(); | 
| 78 } | 78 } | 
| 79 | 79 | 
| OLD | NEW | 
|---|