Index: chrome/browser/extensions/api/tabs/ash_panel_contents.cc |
diff --git a/chrome/browser/extensions/api/tabs/ash_panel_contents.cc b/chrome/browser/extensions/api/tabs/ash_panel_contents.cc |
index b3f289122f6f1af1e9b4e0da914bc6e05d2c35a5..51731713f834bd5bcd9b42622b15bb91061a4227 100644 |
--- a/chrome/browser/extensions/api/tabs/ash_panel_contents.cc |
+++ b/chrome/browser/extensions/api/tabs/ash_panel_contents.cc |
@@ -21,18 +21,18 @@ |
#include "extensions/common/extension.h" |
#include "ui/gfx/image/image.h" |
-using apps::ShellWindow; |
+using apps::AppWindow; |
using apps::NativeAppWindow; |
// AshPanelWindowController ---------------------------------------------------- |
-// This class enables a ShellWindow instance to be accessed (to a limited |
+// This class enables an AppWindow instance to be accessed (to a limited |
// extent) via the chrome.windows and chrome.tabs API. This is a temporary |
-// bridge to support instantiating ShellWindows from v1 apps, specifically |
+// bridge to support instantiating AppWindows from v1 apps, specifically |
// for creating Panels in Ash. See crbug.com/160645. |
class AshPanelWindowController : public extensions::WindowController { |
public: |
- AshPanelWindowController(ShellWindow* window, Profile* profile); |
+ AshPanelWindowController(AppWindow* window, Profile* profile); |
virtual ~AshPanelWindowController(); |
void NativeWindowChanged(); |
@@ -51,17 +51,17 @@ class AshPanelWindowController : public extensions::WindowController { |
const extensions::Extension* extension) const OVERRIDE; |
private: |
- ShellWindow* shell_window_; // Weak pointer; this is owned by shell_window_ |
+ AppWindow* app_window_; // Weak pointer; this is owned by app_window_ |
bool is_active_; |
DISALLOW_COPY_AND_ASSIGN(AshPanelWindowController); |
}; |
-AshPanelWindowController::AshPanelWindowController( |
- ShellWindow* shell_window, Profile* profile) |
- : extensions::WindowController(shell_window->GetBaseWindow(), profile), |
- shell_window_(shell_window), |
- is_active_(shell_window->GetBaseWindow()->IsActive()) { |
+AshPanelWindowController::AshPanelWindowController(AppWindow* app_window, |
+ Profile* profile) |
+ : extensions::WindowController(app_window->GetBaseWindow(), profile), |
+ app_window_(app_window), |
+ is_active_(app_window->GetBaseWindow()->IsActive()) { |
extensions::WindowControllerList::GetInstance()->AddExtensionWindow(this); |
} |
@@ -70,7 +70,7 @@ AshPanelWindowController::~AshPanelWindowController() { |
} |
int AshPanelWindowController::GetWindowId() const { |
- return static_cast<int>(shell_window_->session_id().id()); |
+ return static_cast<int>(app_window_->session_id().id()); |
} |
std::string AshPanelWindowController::GetWindowTypeText() const { |
@@ -96,7 +96,7 @@ base::DictionaryValue* AshPanelWindowController::CreateTabValue( |
(tab_index > 0)) { |
return NULL; |
} |
- content::WebContents* web_contents = shell_window_->web_contents(); |
+ content::WebContents* web_contents = app_window_->web_contents(); |
if (!web_contents) |
return NULL; |
@@ -112,10 +112,9 @@ base::DictionaryValue* AshPanelWindowController::CreateTabValue( |
extensions::tabs_constants::kStatusKey, |
extensions::ExtensionTabUtil::GetTabStatusText( |
web_contents->IsLoading())); |
- tab_value->SetBoolean( |
- extensions::tabs_constants::kActiveKey, |
- shell_window_->GetBaseWindow()->IsActive()); |
- // ShellWindow only ever contains one tab, so that tab is always effectively |
+ tab_value->SetBoolean(extensions::tabs_constants::kActiveKey, |
+ app_window_->GetBaseWindow()->IsActive()); |
+ // AppWindow only ever contains one tab, so that tab is always effectively |
// selcted and highlighted (for purposes of the chrome.tabs API). |
tab_value->SetInteger(extensions::tabs_constants::kWindowIdKey, window_id); |
tab_value->SetInteger(extensions::tabs_constants::kIdKey, window_id); |
@@ -141,12 +140,12 @@ void AshPanelWindowController::SetFullscreenMode( |
bool AshPanelWindowController::IsVisibleToExtension( |
const extensions::Extension* extension) const { |
- return shell_window_->extension() && |
- extension->id() == shell_window_->extension()->id(); |
+ return app_window_->extension() && |
+ extension->id() == app_window_->extension()->id(); |
} |
void AshPanelWindowController::NativeWindowChanged() { |
- bool active = shell_window_->GetBaseWindow()->IsActive(); |
+ bool active = app_window_->GetBaseWindow()->IsActive(); |
if (active == is_active_) |
return; |
is_active_ = active; |
@@ -161,9 +160,7 @@ void AshPanelWindowController::NativeWindowChanged() { |
// AshPanelContents ----------------------------------------------------- |
-AshPanelContents::AshPanelContents(ShellWindow* host) |
- : host_(host) { |
-} |
+AshPanelContents::AshPanelContents(AppWindow* host) : host_(host) {} |
AshPanelContents::~AshPanelContents() { |
} |
@@ -188,7 +185,7 @@ void AshPanelContents::Initialize(content::BrowserContext* context, |
// Responsible for loading favicons for the Launcher, which uses different |
// logic than the FaviconTabHelper associated with web_contents_ |
- // (instantiated in ShellWindow::Init()) |
+ // (instantiated in AppWindow::Init()) |
launcher_favicon_loader_.reset( |
new LauncherFaviconLoader(this, web_contents_.get())); |