diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-29 06:41:16 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-29 06:41:16 +0000 |
commit | 680001521b1a0456faf94e2ac7c8105d9cfc1ead (patch) | |
tree | f0dc8f0c92abb559def337ec010267e3f1c0b05b | |
parent | 673aad7b21c78797c8f1d280c5cd508ba3cd7dec (diff) | |
download | chromium_src-680001521b1a0456faf94e2ac7c8105d9cfc1ead.zip chromium_src-680001521b1a0456faf94e2ac7c8105d9cfc1ead.tar.gz chromium_src-680001521b1a0456faf94e2ac7c8105d9cfc1ead.tar.bz2 |
Fixing more bustage by ifdefing out Windows-only code.
TBR=brettw
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/115914
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17173 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/extensions/extension_host.cc | 16 | ||||
-rw-r--r-- | chrome/browser/extensions/extension_host.h | 4 |
2 files changed, 19 insertions, 1 deletions
diff --git a/chrome/browser/extensions/extension_host.cc b/chrome/browser/extensions/extension_host.cc index e1e87fe..741c9fc 100644 --- a/chrome/browser/extensions/extension_host.cc +++ b/chrome/browser/extensions/extension_host.cc @@ -29,7 +29,11 @@ #include "webkit/glue/context_menu.h" ExtensionHost::ExtensionHost(Extension* extension, SiteInstance* site_instance) - : extension_(extension), view_(NULL), did_stop_loading_(false) { + : extension_(extension), +#if defined(OS_WIN) + view_(NULL), +#endif + did_stop_loading_(false) { render_view_host_ = new RenderViewHost( site_instance, this, MSG_ROUTING_NONE, NULL); render_view_host_->AllowExtensionBindings(); @@ -52,8 +56,10 @@ void ExtensionHost::CreateRenderView(const GURL& url, } void ExtensionHost::UpdatePreferredWidth(int pref_width) { +#if defined(OS_WIN) if (view_) view_->DidContentsPreferredWidthChange(pref_width); +#endif } WebPreferences ExtensionHost::GetWebkitPrefs() { @@ -86,8 +92,10 @@ void ExtensionHost::DidStopLoading(RenderViewHost* render_view_host) { render_view_host->WasResized(); did_stop_loading_ = true; +#if defined(OS_WIN) if (view_) view_->ShowIfCompletelyLoaded(); +#endif } ExtensionFunctionDispatcher* ExtensionHost:: @@ -158,18 +166,24 @@ void ExtensionHost::HandleKeyboardEvent(const NativeWebKeyboardEvent& event) { } void ExtensionHost::HandleMouseEvent() { +#if defined(OS_WIN) if (view_) view_->HandleMouseEvent(); +#endif } void ExtensionHost::HandleMouseLeave() { +#if defined(OS_WIN) if (view_) view_->HandleMouseLeave(); +#endif } Browser* ExtensionHost::GetBrowser() { +#if defined(OS_WIN) if (view_) return view_->browser(); +#endif Browser* browser = BrowserList::GetLastActiveWithProfile( render_view_host()->process()->profile()); // TODO(mpcomplete): what this verifies doesn't actually happen yet. diff --git a/chrome/browser/extensions/extension_host.h b/chrome/browser/extensions/extension_host.h index fc5e0ca..95a885c 100644 --- a/chrome/browser/extensions/extension_host.h +++ b/chrome/browser/extensions/extension_host.h @@ -27,8 +27,10 @@ class ExtensionHost : public RenderViewHostDelegate, ExtensionHost(Extension* extension, SiteInstance* site_instance); ~ExtensionHost(); +#if defined(OS_WIN) void set_view(ExtensionView* view) { view_ = view; } ExtensionView* view() const { return view_; } +#endif Extension* extension() { return extension_; } RenderViewHost* render_view_host() const { return render_view_host_; } SiteInstance* site_instance() const; @@ -84,8 +86,10 @@ class ExtensionHost : public RenderViewHostDelegate, // The extension that we're hosting in this view. Extension* extension_; +#if defined(OS_WIN) // Optional view that shows the rendered content in the UI. ExtensionView* view_; +#endif // The host for our HTML content. RenderViewHost* render_view_host_; |