Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(845)

Unified Diff: chrome/browser/ui/browser_tab_restore_service_delegate.cc

Issue 9359022: Aura: Support hovering restore & close buttons for full screen apps (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix browser_test Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/browser_tab_restore_service_delegate.cc
diff --git a/chrome/browser/ui/browser_tab_restore_service_delegate.cc b/chrome/browser/ui/browser_tab_restore_service_delegate.cc
index 2db512746294a50b65ce39c4969aa93566715f08..360339997eb8caf548419e7615032c94f675f623 100644
--- a/chrome/browser/ui/browser_tab_restore_service_delegate.cc
+++ b/chrome/browser/ui/browser_tab_restore_service_delegate.cc
@@ -29,6 +29,10 @@ int BrowserTabRestoreServiceDelegate::GetSelectedIndex() const {
return browser_->active_index();
}
+std::string BrowserTabRestoreServiceDelegate::GetAppName() const {
+ return browser_->app_name();
+}
+
WebContents* BrowserTabRestoreServiceDelegate::GetWebContentsAt(
int index) const {
return browser_->GetWebContentsAt(index);
@@ -74,8 +78,19 @@ void BrowserTabRestoreServiceDelegate::CloseTab() {
// Implementations of TabRestoreServiceDelegate static methods
// static
-TabRestoreServiceDelegate* TabRestoreServiceDelegate::Create(Profile* profile) {
- Browser* browser = Browser::Create(profile);
+TabRestoreServiceDelegate* TabRestoreServiceDelegate::Create(
+ Profile* profile,
+ const std::string& app_name) {
+ Browser* browser;
+ if (app_name.empty()) {
+ browser = Browser::Create(profile);
+ } else {
+ browser = Browser::CreateForApp(
+ Browser::TYPE_POPUP,
+ app_name,
+ gfx::Rect(),
+ profile);
+ }
if (browser)
return browser->tab_restore_service_delegate();
else

Powered by Google App Engine
This is Rietveld 408576698