Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Side by Side Diff: chrome/browser/ui/views/open_pdf_in_reader_bubble_view.cc

Issue 477263003: pdf: Create a separate component for using the pdf pepper plugin. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_client.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::OpenPDFInReaderPromptClient* 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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698