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

Unified Diff: chrome/browser/ui/panels/panel.cc

Issue 10965023: [Panels] Provide a tab id for web contents in Panels. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Synced Created 8 years, 3 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/extensions/extension_messages_apitest.cc ('k') | chrome/browser/ui/panels/panel_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/panels/panel.cc
diff --git a/chrome/browser/ui/panels/panel.cc b/chrome/browser/ui/panels/panel.cc
index 433b2a7f263ff3bd2914f3f683dca99112704209..8808c180800cf17f5363513578bc7ee6f64e877e 100644
--- a/chrome/browser/ui/panels/panel.cc
+++ b/chrome/browser/ui/panels/panel.cc
@@ -93,13 +93,11 @@ PanelExtensionWindowController::CreateWindowValueWithTabs(
content::WebContents* web_contents = panel_->GetWebContents();
if (web_contents) {
DictionaryValue* tab_value = new DictionaryValue();
- // TabId must be >= 0. Use panel session id to avoid conflict with
- // browser tab ids (which are also session ids).
tab_value->SetInteger(extensions::tabs_constants::kIdKey,
- panel_->session_id().id());
+ SessionID::IdForTab(web_contents));
tab_value->SetInteger(extensions::tabs_constants::kIndexKey, 0);
- tab_value->SetInteger(
- extensions::tabs_constants::kWindowIdKey, GetWindowId());
+ tab_value->SetInteger(extensions::tabs_constants::kWindowIdKey,
+ SessionID::IdForWindowContainingTab(web_contents));
tab_value->SetString(
extensions::tabs_constants::kUrlKey, web_contents->GetURL().spec());
tab_value->SetString(extensions::tabs_constants::kStatusKey,
« no previous file with comments | « chrome/browser/extensions/extension_messages_apitest.cc ('k') | chrome/browser/ui/panels/panel_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698