From d0cc9fb540e7d11f8b154d513bf0a1c75460245c Mon Sep 17 00:00:00 2001 From: "ben@chromium.org" Date: Tue, 23 Jun 2009 02:26:16 +0000 Subject: Rejiggers the keyword editor so that the UI is independent of the model rather than being derived from it. This reduces the spaghetti somewhat. Also decouples the notion of a native view hierarchy from the location in TabContents::PageHasOSDD where the template URL fetcher is spawned. The Template URL Fetcher now simply retains a reference to the TabContents that created it. If the TabContents is destroyed before the fetch completes, we just discard the data retrieved without adding a keyword. BUG=none TEST=none Review URL: http://codereview.chromium.org/140054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19003 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/views/frame/browser_view.cc | 6 ++++++ chrome/browser/views/frame/browser_view.h | 2 ++ 2 files changed, 8 insertions(+) (limited to 'chrome/browser/views/frame') diff --git a/chrome/browser/views/frame/browser_view.cc b/chrome/browser/views/frame/browser_view.cc index bfb85f8..ea96ac1 100644 --- a/chrome/browser/views/frame/browser_view.cc +++ b/chrome/browser/views/frame/browser_view.cc @@ -809,6 +809,12 @@ void BrowserView::DisableInactiveFrame() { frame_->GetWindow()->DisableInactiveRendering(); } +void BrowserView::ConfirmAddSearchProvider(const TemplateURL* template_url, + Profile* profile) { + browser::EditSearchEngine(GetWindow()->GetNativeWindow(), template_url, NULL, + profile); +} + void BrowserView::ToggleBookmarkBar() { bookmark_utils::ToggleWhenVisible(browser_->profile()); } diff --git a/chrome/browser/views/frame/browser_view.h b/chrome/browser/views/frame/browser_view.h index 03b75a3..4ca85c4 100644 --- a/chrome/browser/views/frame/browser_view.h +++ b/chrome/browser/views/frame/browser_view.h @@ -213,6 +213,8 @@ class BrowserView : public BrowserWindow, virtual bool IsBookmarkBarVisible() const; virtual gfx::Rect GetRootWindowResizerRect() const; virtual void DisableInactiveFrame(); + virtual void ConfirmAddSearchProvider(const TemplateURL* template_url, + Profile* profile); virtual void ToggleBookmarkBar(); virtual void ShowAboutChromeDialog(); virtual void ShowTaskManager(); -- cgit v1.1