summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents
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/tab_contents
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/tab_contents')
-rw-r--r--chrome/browser/tab_contents/web_contents.cc9
-rw-r--r--chrome/browser/tab_contents/web_contents.h4
2 files changed, 5 insertions, 8 deletions
diff --git a/chrome/browser/tab_contents/web_contents.cc b/chrome/browser/tab_contents/web_contents.cc
index 95ca5b7..7f6cc79 100644
--- a/chrome/browser/tab_contents/web_contents.cc
+++ b/chrome/browser/tab_contents/web_contents.cc
@@ -14,6 +14,7 @@
#include "chrome/browser/bookmarks/bookmark_model.h"
#include "chrome/browser/browser.h"
#include "chrome/browser/dom_operation_notification_details.h"
+#include "chrome/browser/gears_integration.h"
#include "chrome/browser/google_util.h"
#include "chrome/browser/js_before_unload_handler.h"
#include "chrome/browser/jsmessage_box_handler.h"
@@ -44,7 +45,6 @@
#include "chrome/browser/character_encoding.h"
#include "chrome/browser/download/download_manager.h"
#include "chrome/browser/download/download_request_manager.h"
-#include "chrome/browser/gears_integration.h"
#include "chrome/browser/modal_html_dialog_delegate.h"
#include "chrome/browser/plugin_installer.h"
#include "chrome/browser/plugin_service.h"
@@ -169,7 +169,7 @@ class WebContents::GearsCreateShortcutCallbackFunctor {
explicit GearsCreateShortcutCallbackFunctor(WebContents* contents)
: contents_(contents) {}
- void Run(const GearsShortcutData& shortcut_data, bool success) {
+ void Run(const GearsShortcutData2& shortcut_data, bool success) {
if (contents_)
contents_->OnGearsCreateShortcutDone(shortcut_data, success);
delete this;
@@ -1340,15 +1340,12 @@ void WebContents::OnDidGetApplicationInfo(
if (pending_install_.page_id != page_id)
return; // The user clicked create on a separate page. Ignore this.
-#if defined(OS_WIN)
- // TODO(port): include when gears integration is ported
pending_install_.callback_functor =
new GearsCreateShortcutCallbackFunctor(this);
GearsCreateShortcut(
info, pending_install_.title, pending_install_.url, pending_install_.icon,
NewCallback(pending_install_.callback_functor,
&GearsCreateShortcutCallbackFunctor::Run));
-#endif
}
void WebContents::OnEnterOrSpace() {
@@ -1575,7 +1572,7 @@ void WebContents::UpdateWebPreferences() {
}
void WebContents::OnGearsCreateShortcutDone(
- const GearsShortcutData& shortcut_data, bool success) {
+ const GearsShortcutData2& shortcut_data, bool success) {
NavigationEntry* current_entry = controller()->GetLastCommittedEntry();
bool same_page =
current_entry && pending_install_.page_id == current_entry->page_id();
diff --git a/chrome/browser/tab_contents/web_contents.h b/chrome/browser/tab_contents/web_contents.h
index 275f6f3..e93cc0b 100644
--- a/chrome/browser/tab_contents/web_contents.h
+++ b/chrome/browser/tab_contents/web_contents.h
@@ -16,6 +16,7 @@
#include "chrome/browser/renderer_host/render_view_host_delegate.h"
#include "chrome/browser/tab_contents/navigation_controller.h"
#include "chrome/browser/tab_contents/render_view_host_manager.h"
+#include "chrome/common/gears_api.h"
#include "net/base/load_states.h"
#include "webkit/glue/password_form.h"
#include "webkit/glue/webpreferences.h"
@@ -28,7 +29,6 @@
#include "chrome/browser/printing/print_view_manager.h"
#include "chrome/browser/shell_dialogs.h"
#include "chrome/browser/tab_contents/tab_contents.h"
-#include "chrome/common/gears_api.h"
#endif
class AutofillForm;
@@ -461,7 +461,7 @@ class WebContents : public TabContents,
// Called when the user dismisses the shortcut creation dialog. 'success' is
// true if the shortcut was created.
- void OnGearsCreateShortcutDone(const GearsShortcutData& shortcut_data,
+ void OnGearsCreateShortcutDone(const GearsShortcutData2& shortcut_data,
bool success);
// If our controller was restored and the page id is > than the site