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

Side by Side Diff: pdf/out_of_process_instance.cc

Issue 817153002: Switch users of foundation_util.h to include it directly and clean up uses of mac_util.h. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « net/cert/cert_verify_proc_unittest.cc ('k') | skia/ext/skia_utils_mac_unittest.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "pdf/out_of_process_instance.h" 5 #include "pdf/out_of_process_instance.h"
6 6
7 #include <algorithm> // for min/max() 7 #include <algorithm> // for min/max()
8 #define _USE_MATH_DEFINES // for M_PI 8 #define _USE_MATH_DEFINES // for M_PI
9 #include <cmath> // for log() and pow() 9 #include <cmath> // for log() and pow()
10 #include <math.h> 10 #include <math.h>
(...skipping 24 matching lines...) Expand all
35 #include "ppapi/cpp/private/pdf.h" 35 #include "ppapi/cpp/private/pdf.h"
36 #include "ppapi/cpp/private/var_private.h" 36 #include "ppapi/cpp/private/var_private.h"
37 #include "ppapi/cpp/rect.h" 37 #include "ppapi/cpp/rect.h"
38 #include "ppapi/cpp/resource.h" 38 #include "ppapi/cpp/resource.h"
39 #include "ppapi/cpp/url_request_info.h" 39 #include "ppapi/cpp/url_request_info.h"
40 #include "ppapi/cpp/var_array.h" 40 #include "ppapi/cpp/var_array.h"
41 #include "ppapi/cpp/var_dictionary.h" 41 #include "ppapi/cpp/var_dictionary.h"
42 #include "ui/events/keycodes/keyboard_codes.h" 42 #include "ui/events/keycodes/keyboard_codes.h"
43 #include "v8/include/v8.h" 43 #include "v8/include/v8.h"
44 44
45 #if defined(OS_MACOSX)
46 #include "base/mac/mac_util.h"
47 #endif
48
49 namespace chrome_pdf { 45 namespace chrome_pdf {
50 46
51 const char kChromePrint[] = "chrome://print/"; 47 const char kChromePrint[] = "chrome://print/";
52 const char kChromeExtension[] = 48 const char kChromeExtension[] =
53 "chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai"; 49 "chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai";
54 50
55 // Dictionary Value key names for the document accessibility info 51 // Dictionary Value key names for the document accessibility info
56 const char kAccessibleNumberOfPages[] = "numberOfPages"; 52 const char kAccessibleNumberOfPages[] = "numberOfPages";
57 const char kAccessibleLoaded[] = "loaded"; 53 const char kAccessibleLoaded[] = "loaded";
58 const char kAccessibleCopyable[] = "copyable"; 54 const char kAccessibleCopyable[] = "copyable";
(...skipping 1337 matching lines...) Expand 10 before | Expand all | Expand 10 after
1396 pp::FloatPoint OutOfProcessInstance::BoundScrollOffsetToDocument( 1392 pp::FloatPoint OutOfProcessInstance::BoundScrollOffsetToDocument(
1397 const pp::FloatPoint& scroll_offset) { 1393 const pp::FloatPoint& scroll_offset) {
1398 float max_x = document_size_.width() * zoom_ - plugin_dip_size_.width(); 1394 float max_x = document_size_.width() * zoom_ - plugin_dip_size_.width();
1399 float x = std::max(std::min(scroll_offset.x(), max_x), 0.0f); 1395 float x = std::max(std::min(scroll_offset.x(), max_x), 0.0f);
1400 float max_y = document_size_.height() * zoom_ - plugin_dip_size_.height(); 1396 float max_y = document_size_.height() * zoom_ - plugin_dip_size_.height();
1401 float y = std::max(std::min(scroll_offset.y(), max_y), 0.0f); 1397 float y = std::max(std::min(scroll_offset.y(), max_y), 0.0f);
1402 return pp::FloatPoint(x, y); 1398 return pp::FloatPoint(x, y);
1403 } 1399 }
1404 1400
1405 } // namespace chrome_pdf 1401 } // namespace chrome_pdf
OLDNEW
« no previous file with comments | « net/cert/cert_verify_proc_unittest.cc ('k') | skia/ext/skia_utils_mac_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698