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

Unified Diff: chrome/browser/chromeos/frame/browser_view.cc

Issue 661237: This adds in the ability for Chrome to generate windows with snapshots of all... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 8 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
« no previous file with comments | « chrome/browser/browser_init.cc ('k') | chrome/browser/chromeos/panels/panel_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/frame/browser_view.cc
===================================================================
--- chrome/browser/chromeos/frame/browser_view.cc (revision 45523)
+++ chrome/browser/chromeos/frame/browser_view.cc (working copy)
@@ -6,6 +6,7 @@
#include <algorithm>
#include <string>
+#include <vector>
#include "app/menus/simple_menu_model.h"
#include "app/theme_provider.h"
@@ -392,16 +393,29 @@
otr_avatar_icon_->SetImage(GetOTRAvatarIcon());
otr_avatar_icon_->SetID(VIEW_ID_OTR_AVATAR);
AddChildView(otr_avatar_icon_);
+
+ // Make sure the window is set to the right type.
+ std::vector<int> params;
+ params.push_back(browser()->tab_count());
+ params.push_back(browser()->selected_index());
+ WmIpc::instance()->SetWindowType(
+ GTK_WIDGET(frame()->GetWindow()->GetNativeWindow()),
+ WmIpc::WINDOW_TYPE_CHROME_TOPLEVEL,
+ &params);
}
void BrowserView::Show() {
bool was_visible = frame()->GetWindow()->IsVisible();
::BrowserView::Show();
if (!was_visible) {
+ // Have to update the tab count and selected index to reflect reality.
+ std::vector<int> params;
+ params.push_back(browser()->tab_count());
+ params.push_back(browser()->selected_index());
WmIpc::instance()->SetWindowType(
GTK_WIDGET(frame()->GetWindow()->GetNativeWindow()),
WmIpc::WINDOW_TYPE_CHROME_TOPLEVEL,
- NULL);
+ &params);
}
}
« no previous file with comments | « chrome/browser/browser_init.cc ('k') | chrome/browser/chromeos/panels/panel_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698