OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/printing/print_dialog_gtk.h" | 5 #include "chrome/browser/printing/print_dialog_gtk.h" |
6 | 6 |
7 #include <gtk/gtkprintjob.h> | 7 #include <gtk/gtkprintjob.h> |
8 #include <gtk/gtkprintunixdialog.h> | 8 #include <gtk/gtkprintunixdialog.h> |
9 #include <gtk/gtkpagesetupunixdialog.h> | 9 #include <gtk/gtkpagesetupunixdialog.h> |
10 | 10 |
11 #include "base/file_util.h" | 11 #include "base/file_util.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 string16 message = UTF8ToUTF16("Oops! Your printer does not support PDF. " | 46 string16 message = UTF8ToUTF16("Oops! Your printer does not support PDF. " |
47 "Please report this to us."); | 47 "Please report this to us."); |
48 *link_offset = message.length() - 1; | 48 *link_offset = message.length() - 1; |
49 return message; | 49 return message; |
50 } | 50 } |
51 | 51 |
52 virtual string16 GetLinkText() const { | 52 virtual string16 GetLinkText() const { |
53 return UTF8ToUTF16("here"); | 53 return UTF8ToUTF16("here"); |
54 } | 54 } |
55 | 55 |
56 virtual Type GetInfoBarType() { return WARNING_TYPE; } | 56 virtual Type GetInfoBarType() const { return WARNING_TYPE; } |
57 | 57 |
58 virtual bool LinkClicked(WindowOpenDisposition disposition) { | 58 virtual bool LinkClicked(WindowOpenDisposition disposition) { |
59 browser_->OpenURL( | 59 browser_->OpenURL( |
60 GURL("http://code.google.com/p/chromium/issues/detail?id=22027"), | 60 GURL("http://code.google.com/p/chromium/issues/detail?id=22027"), |
61 GURL(), NEW_FOREGROUND_TAB, PageTransition::TYPED); | 61 GURL(), NEW_FOREGROUND_TAB, PageTransition::TYPED); |
62 return true; | 62 return true; |
63 } | 63 } |
64 | 64 |
65 private: | 65 private: |
66 Browser* browser_; | 66 Browser* browser_; |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 g_object_unref(job); | 179 g_object_unref(job); |
180 | 180 |
181 base::FileUtilProxy::Delete( | 181 base::FileUtilProxy::Delete( |
182 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE), | 182 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE), |
183 path_to_pdf_, | 183 path_to_pdf_, |
184 false, | 184 false, |
185 NULL); | 185 NULL); |
186 | 186 |
187 delete this; | 187 delete this; |
188 } | 188 } |
OLD | NEW |