diff options
author | rogerta@chromium.org <rogerta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-01 03:00:52 +0000 |
---|---|---|
committer | rogerta@chromium.org <rogerta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-01 03:00:52 +0000 |
commit | a83880dc0aa05ad44546c7d5a06781dd9c236bcd (patch) | |
tree | b75c9b6ddb2b8d4978d2f4389798512b80923f1d /chrome_frame/np_utils.h | |
parent | 196d0b8189d0ed873adb87aa21beface3f4002b0 (diff) | |
download | chromium_src-a83880dc0aa05ad44546c7d5a06781dd9c236bcd.zip chromium_src-a83880dc0aa05ad44546c7d5a06781dd9c236bcd.tar.gz chromium_src-a83880dc0aa05ad44546c7d5a06781dd9c236bcd.tar.bz2 |
In order for CF to support FF3.6, the code that checks for privilege mode needs to be
updated since it currently depends on APIs that have been deprecated. The
new method for determining if CF is running in privilege mode is to verify that
the URL of the page that instantiates CF is a "chrome:" URL.
An advantage to this change is the code should now work in all version of
Firefox. Previously, the code was different for each of versions 3.0, 3.5, and
now 3.6.
Note that the API change to npapi::GetStringIdentifiers() was necessary to get
around a problem where xpcom defines the same typedefs as chrome base, but with
different types. If there is a better solution, please let me know.
TEST=see existing unit tests
BUG=none
Review URL: http://codereview.chromium.org/1535002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43311 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/np_utils.h')
-rw-r--r-- | chrome_frame/np_utils.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/chrome_frame/np_utils.h b/chrome_frame/np_utils.h new file mode 100644 index 0000000..f2aa387 --- /dev/null +++ b/chrome_frame/np_utils.h @@ -0,0 +1,20 @@ +// Copyright (c) 2010 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 CHROME_FRAME_NP_UTILS_H_ +#define CHROME_FRAME_NP_UTILS_H_ + +#include <string> + +#include "base/basictypes.h" +#include "third_party/WebKit/WebCore/bridge/npapi.h" +#include "third_party/WebKit/WebCore/plugins/npfunctions.h" + +namespace np_utils { + +std::string GetLocation(NPP instance, NPObject* window); + +} // namespace np_utils + +#endif // CHROME_FRAME_NP_UTILS_H_
\ No newline at end of file |