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
3// found in the LICENSE file.
4
5#include "pdf/preview_mode_client.h"
6
7#include "base/logging.h"
8#include "pdf/instance.h"
9
10namespace chrome_pdf {
11
12PreviewModeClient::PreviewModeClient(Client* client)
13    : client_(client) {
14}
15
16void PreviewModeClient::DocumentSizeUpdated(const pp::Size& size) {
17}
18
19void PreviewModeClient::Invalidate(const pp::Rect& rect) {
20  NOTREACHED();
21}
22
23void PreviewModeClient::Scroll(const pp::Point& point) {
24  NOTREACHED();
25}
26
27void PreviewModeClient::ScrollToX(int position) {
28  NOTREACHED();
29}
30
31void PreviewModeClient::ScrollToY(int position) {
32  NOTREACHED();
33}
34
35void PreviewModeClient::ScrollToPage(int page) {
36  NOTREACHED();
37}
38
39void PreviewModeClient::NavigateTo(const std::string& url,
40                                   bool open_in_new_tab) {
41  NOTREACHED();
42}
43
44void PreviewModeClient::UpdateCursor(PP_CursorType_Dev cursor) {
45  NOTREACHED();
46}
47
48void PreviewModeClient::UpdateTickMarks(
49    const std::vector<pp::Rect>& tickmarks) {
50  NOTREACHED();
51}
52
53void PreviewModeClient::NotifyNumberOfFindResultsChanged(int total,
54                                                         bool final_result) {
55  NOTREACHED();
56}
57
58void PreviewModeClient::NotifySelectedFindResultChanged(
59    int current_find_index) {
60  NOTREACHED();
61}
62
63void PreviewModeClient::GetDocumentPassword(
64    pp::CompletionCallbackWithOutput<pp::Var> callback) {
65  callback.Run(PP_ERROR_FAILED);
66}
67
68void PreviewModeClient::Alert(const std::string& message) {
69  NOTREACHED();
70}
71
72bool PreviewModeClient::Confirm(const std::string& message) {
73  NOTREACHED();
74  return false;
75}
76
77std::string PreviewModeClient::Prompt(const std::string& question,
78                                      const std::string& default_answer) {
79  NOTREACHED();
80  return std::string();
81}
82
83std::string PreviewModeClient::GetURL() {
84  NOTREACHED();
85  return std::string();
86}
87
88void PreviewModeClient::Email(const std::string& to,
89                              const std::string& cc,
90                              const std::string& bcc,
91                              const std::string& subject,
92                              const std::string& body) {
93  NOTREACHED();
94}
95
96void PreviewModeClient::Print() {
97  NOTREACHED();
98}
99
100void PreviewModeClient::SubmitForm(const std::string& url,
101                                   const void* data,
102                                   int length) {
103  NOTREACHED();
104}
105
106std::string PreviewModeClient::ShowFileSelectionDialog() {
107  NOTREACHED();
108  return std::string();
109}
110
111pp::URLLoader PreviewModeClient::CreateURLLoader() {
112  NOTREACHED();
113  return pp::URLLoader();
114}
115
116void PreviewModeClient::ScheduleCallback(int id, int delay_in_ms) {
117  NOTREACHED();
118}
119
120void PreviewModeClient::SearchString(const base::char16* string,
121                                     const base::char16* term,
122                                     bool case_sensitive,
123                                     std::vector<SearchStringResult>* results) {
124  NOTREACHED();
125}
126
127void PreviewModeClient::DocumentPaintOccurred() {
128  NOTREACHED();
129}
130
131void PreviewModeClient::DocumentLoadComplete(int page_count) {
132  client_->PreviewDocumentLoadComplete();
133}
134
135void PreviewModeClient::DocumentLoadFailed() {
136  client_->PreviewDocumentLoadFailed();
137}
138
139pp::Instance* PreviewModeClient::GetPluginInstance() {
140  NOTREACHED();
141  return NULL;
142}
143
144void PreviewModeClient::DocumentHasUnsupportedFeature(
145    const std::string& feature) {
146  NOTREACHED();
147}
148
149void PreviewModeClient::DocumentLoadProgress(uint32 available,
150                                             uint32 doc_size) {
151}
152
153void PreviewModeClient::FormTextFieldFocusChange(bool in_focus) {
154  NOTREACHED();
155}
156
157bool PreviewModeClient::IsPrintPreview() {
158  NOTREACHED();
159  return false;
160}
161
162}  // namespace chrome_pdf
163