summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gears_integration.cc
diff options
context:
space:
mode:
authorjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-17 23:32:51 +0000
committerjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-17 23:32:51 +0000
commit4e5c1084d36e100572b2bcee0c10caf35e0f2367 (patch)
tree2b1b80512adcbbf1c7552cf4c25d8905cbd13326 /chrome/browser/gears_integration.cc
parent0cbd2d367068d9b5cc00cf39238f0277cef5ba15 (diff)
downloadchromium_src-4e5c1084d36e100572b2bcee0c10caf35e0f2367.zip
chromium_src-4e5c1084d36e100572b2bcee0c10caf35e0f2367.tar.gz
chromium_src-4e5c1084d36e100572b2bcee0c10caf35e0f2367.tar.bz2
Make gears_integration.cc compile on Posix. Change the GearsCreateShortcut callback to use GearsShortCutData2.
Review URL: http://codereview.chromium.org/20412 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9918 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gears_integration.cc')
-rw-r--r--chrome/browser/gears_integration.cc15
1 files changed, 9 insertions, 6 deletions
diff --git a/chrome/browser/gears_integration.cc b/chrome/browser/gears_integration.cc
index 0801cd6..4017899 100644
--- a/chrome/browser/gears_integration.cc
+++ b/chrome/browser/gears_integration.cc
@@ -94,9 +94,9 @@ inline void EnsureStringValidPathComponent(StringT &s) {
s.resize(kUserPathComponentMaxChars);
}
-void GearsSettingsPressed(HWND parent_hwnd) {
+void GearsSettingsPressed(gfx::NativeWindow parent_wnd) {
CPBrowsingContext context = static_cast<CPBrowsingContext>(
- reinterpret_cast<uintptr_t>(parent_hwnd));
+ reinterpret_cast<uintptr_t>(parent_wnd));
CPHandleCommand(GEARSPLUGINCOMMAND_SHOW_SETTINGS, NULL, context);
}
@@ -142,8 +142,8 @@ class CreateShortcutCommand : public CPCommandInterface {
: name_(name), url_(url), description_(description),
orig_name_(orig_name), callback_(callback),
calling_loop_(MessageLoop::current()) {
- // shortcut_data_ has the same lifetime as our strings, so we just point it
- // at their internal data.
+ // shortcut_data_ has the same lifetime as our strings, so we just
+ // point it at their internal data.
memset(&shortcut_data_, 0, sizeof(shortcut_data_));
shortcut_data_.name = name_.c_str();
shortcut_data_.url = url_.c_str();
@@ -203,8 +203,7 @@ class CreateShortcutCommand : public CPCommandInterface {
// so our name will potentially differ. This is relevant because we store
// some prefs keyed off the webapp name.
shortcut_data_.name = shortcut_data_.orig_name;
- callback_->Run(*reinterpret_cast<GearsShortcutData*>(&shortcut_data_),
- retval == CPERR_SUCCESS);
+ callback_->Run(shortcut_data_, retval == CPERR_SUCCESS);
delete this;
}
@@ -227,9 +226,11 @@ class CreateShortcutCommand : public CPCommandInterface {
// Allows InvokeLater without adding refcounting. The object is only deleted
// when its last InvokeLater is run anyway.
+template<>
void RunnableMethodTraits<CreateShortcutCommand>::RetainCallee(
CreateShortcutCommand* remover) {
}
+template<>
void RunnableMethodTraits<CreateShortcutCommand>::ReleaseCallee(
CreateShortcutCommand* remover) {
}
@@ -299,9 +300,11 @@ class QueryShortcutsCommand : public CPCommandInterface {
// Allows InvokeLater without adding refcounting. The object is only deleted
// when its last InvokeLater is run anyway.
+template<>
void RunnableMethodTraits<QueryShortcutsCommand>::RetainCallee(
QueryShortcutsCommand* remover) {
}
+template<>
void RunnableMethodTraits<QueryShortcutsCommand>::ReleaseCallee(
QueryShortcutsCommand* remover) {
}