From ffe6de61e77abd6fd03ca7949ee2a19c04cf8a04 Mon Sep 17 00:00:00 2001 From: "benwells@chromium.org" Date: Thu, 19 Jul 2012 00:02:35 +0000 Subject: Allow secondary tiles to be unpinned. This change updates the pin menu item to say 'Unpin from Start Screen' when the item is pinned, and if the menu is clicked the tile will be unpinned from the start screen. This change is accompanied by a corresponding change to metro_driver.dll BUG=129598 TEST=Check secondary tiles can be pinned and unpinned from the start screen. Review URL: https://chromiumcodereview.appspot.com/10801006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147347 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/ui/browser_win.cc | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'chrome/browser/ui/browser_win.cc') diff --git a/chrome/browser/ui/browser_win.cc b/chrome/browser/ui/browser_win.cc index 04e203f..b4498b0 100644 --- a/chrome/browser/ui/browser_win.cc +++ b/chrome/browser/ui/browser_win.cc @@ -58,30 +58,6 @@ void NewIncognitoWindow(Browser* browser) { NewEmptyWindow(browser->profile()->GetOffTheRecordProfile()); } -void PinCurrentPageToStartScreen(Browser* browser) { - HMODULE metro_module = base::win::GetMetroModule(); - if (metro_module) { - GURL url; - string16 title; - TabContents* tab = chrome::GetActiveTabContents(browser); - bookmark_utils::GetURLAndTitleToBookmark(tab->web_contents(), &url, &title); - - typedef BOOL (*MetroPinUrlToStartScreen)(const string16&, const string16&); - MetroPinUrlToStartScreen metro_pin_url_to_start_screen = - reinterpret_cast( - ::GetProcAddress(metro_module, "MetroPinUrlToStartScreen")); - if (!metro_pin_url_to_start_screen) { - NOTREACHED(); - return; - } - - VLOG(1) << __FUNCTION__ << " calling pin with title: " << title - << " and url " << UTF8ToUTF16(url.spec()); - metro_pin_url_to_start_screen(title, UTF8ToUTF16(url.spec())); - return; - } -} - } // namespace chrome void Browser::SetMetroSnapMode(bool enable) { -- cgit v1.1