| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/renderer/render_view.h" | 5 #include "chrome/renderer/render_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 // define to write the time necessary for thumbnail/DOM text retrieval, | 138 // define to write the time necessary for thumbnail/DOM text retrieval, |
| 139 // respectively, into the system debug log | 139 // respectively, into the system debug log |
| 140 // #define TIME_BITMAP_RETRIEVAL | 140 // #define TIME_BITMAP_RETRIEVAL |
| 141 // #define TIME_TEXT_RETRIEVAL | 141 // #define TIME_TEXT_RETRIEVAL |
| 142 | 142 |
| 143 // maximum number of characters in the document to index, any text beyond this | 143 // maximum number of characters in the document to index, any text beyond this |
| 144 // point will be clipped | 144 // point will be clipped |
| 145 static const size_t kMaxIndexChars = 65535; | 145 static const size_t kMaxIndexChars = 65535; |
| 146 | 146 |
| 147 // Size of the thumbnails that we'll generate | 147 // Size of the thumbnails that we'll generate |
| 148 static const int kThumbnailWidth = 196; | 148 static const int kThumbnailWidth = 212; |
| 149 static const int kThumbnailHeight = 136; | 149 static const int kThumbnailHeight = 132; |
| 150 | 150 |
| 151 // Delay in milliseconds that we'll wait before capturing the page contents | 151 // Delay in milliseconds that we'll wait before capturing the page contents |
| 152 // and thumbnail. | 152 // and thumbnail. |
| 153 static const int kDelayForCaptureMs = 500; | 153 static const int kDelayForCaptureMs = 500; |
| 154 | 154 |
| 155 // Typically, we capture the page data once the page is loaded. | 155 // Typically, we capture the page data once the page is loaded. |
| 156 // Sometimes, the page never finishes to load, preventing the page capture | 156 // Sometimes, the page never finishes to load, preventing the page capture |
| 157 // To workaround this problem, we always perform a capture after the following | 157 // To workaround this problem, we always perform a capture after the following |
| 158 // delay. | 158 // delay. |
| 159 static const int kDelayForForcedCaptureMs = 6000; | 159 static const int kDelayForForcedCaptureMs = 6000; |
| (...skipping 3229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3389 Send(new ViewHostMsg_PasswordFormsSeen(routing_id_, password_forms)); | 3389 Send(new ViewHostMsg_PasswordFormsSeen(routing_id_, password_forms)); |
| 3390 } | 3390 } |
| 3391 | 3391 |
| 3392 void RenderView::Print(WebFrame* frame, bool script_initiated) { | 3392 void RenderView::Print(WebFrame* frame, bool script_initiated) { |
| 3393 DCHECK(frame); | 3393 DCHECK(frame); |
| 3394 if (print_helper_.get() == NULL) { | 3394 if (print_helper_.get() == NULL) { |
| 3395 print_helper_.reset(new PrintWebViewHelper(this)); | 3395 print_helper_.reset(new PrintWebViewHelper(this)); |
| 3396 } | 3396 } |
| 3397 print_helper_->Print(frame, script_initiated); | 3397 print_helper_->Print(frame, script_initiated); |
| 3398 } | 3398 } |
| OLD | NEW |