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

Unified Diff: chrome/browser/extensions/extension_tab_util.cc

Issue 9428018: Create BaseWindow and ExtensionWindowWrapper for extension API access to Panels (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase 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
« no previous file with comments | « chrome/browser/extensions/extension_tab_util.h ('k') | chrome/browser/extensions/extension_tabs_module.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_tab_util.cc
diff --git a/chrome/browser/extensions/extension_tab_util.cc b/chrome/browser/extensions/extension_tab_util.cc
index ac8f712da08d4ee7b6eba63fb734a66976988d19..98bd0983b49ef860892bc7b69687b50085de147a 100644
--- a/chrome/browser/extensions/extension_tab_util.cc
+++ b/chrome/browser/extensions/extension_tab_util.cc
@@ -2,8 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/extensions/extension_tab_util.h"
+
+#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/tabs/tab_strip_model.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
@@ -149,37 +150,6 @@ DictionaryValue* ExtensionTabUtil::CreateTabValueActive(
return result;
}
-// if |populate| is true, each window gets a list property |tabs| which contains
-// fully populated tab objects.
-DictionaryValue* ExtensionTabUtil::CreateWindowValue(const Browser* browser,
- bool populate_tabs) {
- DCHECK(browser);
- DCHECK(browser->window());
- DictionaryValue* result = new DictionaryValue();
- result->SetInteger(keys::kIdKey, ExtensionTabUtil::GetWindowId(browser));
- result->SetBoolean(keys::kIncognitoKey,
- browser->profile()->IsOffTheRecord());
- result->SetBoolean(keys::kFocusedKey, browser->window()->IsActive());
- gfx::Rect bounds;
- if (browser->window()->IsMaximized() || browser->window()->IsFullscreen())
- bounds = browser->window()->GetBounds();
- else
- bounds = browser->window()->GetRestoredBounds();
-
- result->SetInteger(keys::kLeftKey, bounds.x());
- result->SetInteger(keys::kTopKey, bounds.y());
- result->SetInteger(keys::kWidthKey, bounds.width());
- result->SetInteger(keys::kHeightKey, bounds.height());
- result->SetString(keys::kWindowTypeKey, GetWindowTypeText(browser));
- result->SetString(keys::kShowStateKey, GetWindowShowStateText(browser));
-
- if (populate_tabs) {
- result->Set(keys::kTabsKey, ExtensionTabUtil::CreateTabList(browser));
- }
-
- return result;
-}
-
bool ExtensionTabUtil::GetTabStripModel(const WebContents* web_contents,
TabStripModel** tab_strip_model,
int* tab_index) {
« no previous file with comments | « chrome/browser/extensions/extension_tab_util.h ('k') | chrome/browser/extensions/extension_tabs_module.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698