summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authormattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-17 23:19:56 +0000
committermattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-17 23:19:56 +0000
commitfbb959cbbd75c6dd51cb283464d60deccf947c9e (patch)
treed66514db390eaa377039da0b4b90ec65af95f7b3 /chrome
parentec5612443157e7be4a943cd00ef2687a6992d5fa (diff)
downloadchromium_src-fbb959cbbd75c6dd51cb283464d60deccf947c9e.zip
chromium_src-fbb959cbbd75c6dd51cb283464d60deccf947c9e.tar.gz
chromium_src-fbb959cbbd75c6dd51cb283464d60deccf947c9e.tar.bz2
Pass a gfk::NativeWindow instead of gfx::NativeView for TemplateURLFetcher.
Use cross-platform method to get the NativeWindow. BUG=13326 Review URL: http://codereview.chromium.org/126302 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18666 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/search_engines/template_url_fetcher.cc6
-rw-r--r--chrome/browser/search_engines/template_url_fetcher.h2
-rw-r--r--chrome/browser/tab_contents/tab_contents.cc6
3 files changed, 5 insertions, 9 deletions
diff --git a/chrome/browser/search_engines/template_url_fetcher.cc b/chrome/browser/search_engines/template_url_fetcher.cc
index 177a15b..eca8fd0 100644
--- a/chrome/browser/search_engines/template_url_fetcher.cc
+++ b/chrome/browser/search_engines/template_url_fetcher.cc
@@ -23,7 +23,7 @@ class TemplateURLFetcher::RequestDelegate : public URLFetcher::Delegate {
const std::wstring& keyword,
const GURL& osdd_url,
const GURL& favicon_url,
- gfx::NativeView parent_window,
+ gfx::NativeWindow parent_window,
bool autodetected)
: ALLOW_THIS_IN_INITIALIZER_LIST(url_fetcher_(osdd_url,
URLFetcher::GET, this)),
@@ -62,7 +62,7 @@ class TemplateURLFetcher::RequestDelegate : public URLFetcher::Delegate {
// Used to determine where to place a confirmation dialog. May be NULL,
// in which case the confirmation will be centered in the screen if needed.
- gfx::NativeView parent_window_;
+ gfx::NativeWindow parent_window_;
DISALLOW_COPY_AND_ASSIGN(RequestDelegate);
};
@@ -156,7 +156,7 @@ TemplateURLFetcher::~TemplateURLFetcher() {
void TemplateURLFetcher::ScheduleDownload(const std::wstring& keyword,
const GURL& osdd_url,
const GURL& favicon_url,
- const gfx::NativeView parent_window,
+ const gfx::NativeWindow parent_window,
bool autodetected) {
DCHECK(!keyword.empty() && osdd_url.is_valid());
// Make sure we aren't already downloading this request.
diff --git a/chrome/browser/search_engines/template_url_fetcher.h b/chrome/browser/search_engines/template_url_fetcher.h
index 27703ec..48264dc 100644
--- a/chrome/browser/search_engines/template_url_fetcher.h
+++ b/chrome/browser/search_engines/template_url_fetcher.h
@@ -29,7 +29,7 @@ class TemplateURLFetcher {
void ScheduleDownload(const std::wstring& keyword,
const GURL& osdd_url,
const GURL& favicon_url,
- const gfx::NativeView parent_window,
+ const gfx::NativeWindow parent_window,
bool autodetected);
private:
diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc
index bb3a80f..8ba705f 100644
--- a/chrome/browser/tab_contents/tab_contents.cc
+++ b/chrome/browser/tab_contents/tab_contents.cc
@@ -2019,11 +2019,7 @@ void TabContents::PageHasOSDD(RenderViewHost* render_view_host,
// Download the OpenSearch description document. If this is successful a
// new keyword will be created when done.
-#if defined(OS_WIN)
- gfx::NativeView ancestor = GetAncestor(view_->GetNativeView(), GA_ROOT);
-#else
- gfx::NativeView ancestor = NULL;
-#endif
+ gfx::NativeWindow ancestor = view_->GetTopLevelNativeWindow();
profile()->GetTemplateURLFetcher()->ScheduleDownload(
keyword,
url,