Index: components/pdf/browser/pdf_tab_helper_delegate.h |
diff --git a/components/pdf/browser/pdf_tab_helper_delegate.h b/components/pdf/browser/pdf_tab_helper_delegate.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..fbcde34bd8831dcb28fb9e0a1dcebbb0806dc3bd |
--- /dev/null |
+++ b/components/pdf/browser/pdf_tab_helper_delegate.h |
@@ -0,0 +1,47 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef COMPONENTS_PDF_BROWSER_PDF_TAB_HELPER_DELEGATE_H_ |
+#define COMPONENTS_PDF_BROWSER_PDF_TAB_HELPER_DELEGATE_H_ |
+ |
+#include <string> |
Lei Zhang
2014/08/26 22:41:30
you need base/strings/string16.h instead
sadrul
2014/08/27 00:09:52
Done.
|
+ |
+#include "base/callback.h" |
+#include "base/memory/scoped_ptr.h" |
Lei Zhang
2014/08/26 22:41:30
not needed, neither are the web_contents* #include
sadrul
2014/08/27 00:09:52
Done.
|
+#include "content/public/browser/web_contents_observer.h" |
+#include "content/public/browser/web_contents_user_data.h" |
+#include "ipc/ipc_message.h" |
+ |
+namespace content { |
+class WebContents; |
+} |
+ |
+namespace pdf { |
+ |
+typedef base::Callback< |
+ void(bool /* success */, const base::string16& /* password */)> |
+ PasswordDialogClosedCallback; |
+ |
+class PDFTabHelperDelegate { |
+ public: |
+ virtual ~PDFTabHelperDelegate() {} |
+ |
+ virtual void UpdateLocationBar(content::WebContents* contents) = 0; |
+ |
+ virtual void UpdateContentRestrictions(content::WebContents* contents, |
+ int content_restrictions) = 0; |
+ |
+ virtual void OnPDFHasUnsupportedFeature(content::WebContents* contents) = 0; |
+ |
+ virtual void OnSaveURL(content::WebContents* contents) = 0; |
+ |
+ virtual void OnShowPDFPasswordDialog( |
+ content::WebContents* contents, |
+ const base::string16& prompt, |
+ const PasswordDialogClosedCallback& callback) = 0; |
+}; |
+ |
+} // namespace pdf |
+ |
+#endif // COMPONENTS_PDF_BROWSER_PDF_TAB_HELPER_DELEGATE_H_ |