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

Side by Side Diff: ppapi/cpp/dev/url_util_dev.cc

Issue 4310002: Make PPAPI headers compile with C compilers (gcc on Linux & Mac and MSVS on W... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « ppapi/cpp/dev/url_request_info_dev.cc ('k') | ppapi/cpp/dev/video_decoder_dev.cc » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "ppapi/cpp/dev/url_util_dev.h" 5 #include "ppapi/cpp/dev/url_util_dev.h"
6 6
7 #include "ppapi/cpp/common.h"
7 #include "ppapi/cpp/instance.h" 8 #include "ppapi/cpp/instance.h"
8 #include "ppapi/cpp/module.h" 9 #include "ppapi/cpp/module.h"
9 10
10 namespace pp { 11 namespace pp {
11 12
12 // static 13 // static
13 const UrlUtil_Dev* UrlUtil_Dev::Get() { 14 const UrlUtil_Dev* UrlUtil_Dev::Get() {
14 static bool tried_to_init = false; 15 static bool tried_to_init = false;
15 static UrlUtil_Dev util; 16 static UrlUtil_Dev util;
16 17
(...skipping 28 matching lines...) Expand all
45 const Var& relative_string, 46 const Var& relative_string,
46 PP_UrlComponents_Dev* components) const { 47 PP_UrlComponents_Dev* components) const {
47 return Var(Var::PassRef(), 48 return Var(Var::PassRef(),
48 interface_->ResolveRelativeToDocument(instance.pp_instance(), 49 interface_->ResolveRelativeToDocument(instance.pp_instance(),
49 relative_string.pp_var(), 50 relative_string.pp_var(),
50 components)); 51 components));
51 } 52 }
52 53
53 bool UrlUtil_Dev::IsSameSecurityOrigin(const Var& url_a, 54 bool UrlUtil_Dev::IsSameSecurityOrigin(const Var& url_a,
54 const Var& url_b) const { 55 const Var& url_b) const {
55 return interface_->IsSameSecurityOrigin(url_a.pp_var(), url_b.pp_var()); 56 return PPBoolToBool(interface_->IsSameSecurityOrigin(url_a.pp_var(),
57 url_b.pp_var()));
56 } 58 }
57 59
58 bool UrlUtil_Dev::DocumentCanRequest(const Instance& instance, 60 bool UrlUtil_Dev::DocumentCanRequest(const Instance& instance,
59 const Var& url) const { 61 const Var& url) const {
60 return interface_->DocumentCanRequest(instance.pp_instance(), url.pp_var()); 62 return PPBoolToBool(interface_->DocumentCanRequest(instance.pp_instance(),
63 url.pp_var()));
61 } 64 }
62 65
63 bool UrlUtil_Dev::DocumentCanAccessDocument(const Instance& active, 66 bool UrlUtil_Dev::DocumentCanAccessDocument(const Instance& active,
64 const Instance& target) const { 67 const Instance& target) const {
65 return interface_->DocumentCanAccessDocument(active.pp_instance(), 68 return PPBoolToBool(
66 target.pp_instance()); 69 interface_->DocumentCanAccessDocument(active.pp_instance(),
70 target.pp_instance()));
67 } 71 }
68 72
69 } // namespace pp 73 } // namespace pp
70
OLDNEW
« no previous file with comments | « ppapi/cpp/dev/url_request_info_dev.cc ('k') | ppapi/cpp/dev/video_decoder_dev.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698