Index: chrome/browser/ui/extensions/shell_window.cc |
diff --git a/chrome/browser/ui/extensions/shell_window.cc b/chrome/browser/ui/extensions/shell_window.cc |
index 7406536df1779d07b7685ef43abe8a8d5de44506..5c50e2f1c75320467bad016978f9e6ce2eb19687 100644 |
--- a/chrome/browser/ui/extensions/shell_window.cc |
+++ b/chrome/browser/ui/extensions/shell_window.cc |
@@ -21,7 +21,7 @@ |
#include "chrome/browser/ui/browser_tabstrip.h" |
#include "chrome/browser/ui/browser_window.h" |
#include "chrome/browser/ui/constrained_window_tab_helper.h" |
-#include "chrome/browser/ui/extensions/native_shell_window.h" |
+#include "chrome/browser/ui/extensions/app_base_window.h" |
#include "chrome/browser/ui/intents/web_intent_picker_controller.h" |
#include "chrome/browser/ui/tab_contents/tab_contents.h" |
#include "chrome/browser/view_type_utils.h" |
@@ -142,7 +142,7 @@ void ShellWindow::Init(const GURL& url, |
ShellWindow::CreateParams new_params = params; |
new_params.bounds = bounds; |
- native_window_.reset(NativeShellWindow::Create(this, new_params)); |
+ app_window_.reset(AppBaseWindow::Create(this, new_params)); |
SaveWindowPosition(); |
if (!params.hidden) |
@@ -277,7 +277,7 @@ void ShellWindow::HandleKeyboardEvent( |
WebContents* source, |
const content::NativeWebKeyboardEvent& event) { |
DCHECK_EQ(source, web_contents_); |
- native_window_->HandleKeyboardEvent(event); |
+ app_window_->HandleKeyboardEvent(event); |
} |
void ShellWindow::OnNativeClose() { |
@@ -288,7 +288,7 @@ void ShellWindow::OnNativeClose() { |
} |
BaseWindow* ShellWindow::GetBaseWindow() { |
- return native_window_.get(); |
+ return app_window_.get(); |
} |
string16 ShellWindow::GetTitle() const { |
@@ -316,7 +316,7 @@ bool ShellWindow::OnMessageReceived(const IPC::Message& message) { |
void ShellWindow::UpdateDraggableRegions( |
const std::vector<extensions::DraggableRegion>& regions) { |
- native_window_->UpdateDraggableRegions(regions); |
+ app_window_->UpdateDraggableRegions(regions); |
} |
void ShellWindow::OnImageLoaded(const gfx::Image& image, |
@@ -324,7 +324,7 @@ void ShellWindow::OnImageLoaded(const gfx::Image& image, |
int index) { |
if (!image.IsEmpty()) { |
app_icon_ = image; |
- native_window_->UpdateWindowIcon(); |
+ app_window_->UpdateWindowIcon(); |
} |
app_icon_loader_.reset(); |
} |
@@ -342,7 +342,7 @@ void ShellWindow::UpdateExtensionAppIcon() { |
void ShellWindow::CloseContents(WebContents* contents) { |
DCHECK(contents == web_contents_); |
- native_window_->Close(); |
+ app_window_->Close(); |
} |
bool ShellWindow::ShouldSuppressDialogs() { |
@@ -375,28 +375,28 @@ bool ShellWindow::IsPopupOrPanel(const WebContents* source) const { |
void ShellWindow::MoveContents(WebContents* source, const gfx::Rect& pos) { |
DCHECK(source == web_contents_.get()); |
- native_window_->SetBounds(pos); |
+ app_window_->SetBounds(pos); |
} |
void ShellWindow::NavigationStateChanged( |
const content::WebContents* source, unsigned changed_flags) { |
DCHECK(source == web_contents_.get()); |
if (changed_flags & content::INVALIDATE_TYPE_TITLE) |
- native_window_->UpdateWindowTitle(); |
+ app_window_->UpdateWindowTitle(); |
else if (changed_flags & content::INVALIDATE_TYPE_TAB) |
- native_window_->UpdateWindowIcon(); |
+ app_window_->UpdateWindowIcon(); |
} |
void ShellWindow::ToggleFullscreenModeForTab(content::WebContents* source, |
bool enter_fullscreen) { |
DCHECK(source == web_contents_.get()); |
- native_window_->SetFullscreen(enter_fullscreen); |
+ app_window_->SetFullscreen(enter_fullscreen); |
} |
bool ShellWindow::IsFullscreenForTabOrPending( |
const content::WebContents* source) const { |
DCHECK(source == web_contents_.get()); |
- return native_window_->IsFullscreenOrPending(); |
+ return app_window_->IsFullscreenOrPending(); |
} |
void ShellWindow::Observe(int type, |
@@ -414,7 +414,7 @@ void ShellWindow::Observe(int type, |
// TODO(jianli): once http://crbug.com/123007 is fixed, we'll no longer |
// need to make the native window (ShellWindowViews specially) update |
// the clickthrough region for the new RVH. |
- native_window_->RenderViewHostChanged(); |
+ app_window_->RenderViewHostChanged(); |
break; |
} |
case chrome::NOTIFICATION_EXTENSION_UNLOADED: { |
@@ -422,11 +422,11 @@ void ShellWindow::Observe(int type, |
content::Details<extensions::UnloadedExtensionInfo>( |
details)->extension; |
if (extension_ == unloaded_extension) |
- native_window_->Close(); |
+ app_window_->Close(); |
break; |
} |
case chrome::NOTIFICATION_APP_TERMINATING: |
- native_window_->Close(); |
+ app_window_->Close(); |
break; |
default: |
NOTREACHED() << "Received unexpected notification"; |
@@ -461,9 +461,9 @@ void ShellWindow::AddMessageToDevToolsConsole(ConsoleMessageLevel level, |
} |
void ShellWindow::SendBoundsUpdate() { |
- if (!native_window_ || !web_contents_) |
+ if (!app_window_ || !web_contents_) |
return; |
- gfx::Rect bounds = native_window_->GetBounds(); |
+ gfx::Rect bounds = app_window_->GetBounds(); |
content::RenderViewHost* rvh = web_contents_->GetRenderViewHost(); |
ListValue args; |
app_window::Bounds update; |
@@ -484,14 +484,14 @@ void ShellWindow::SaveWindowPosition() { |
SendBoundsUpdate(); |
if (window_key_.empty()) |
return; |
- if (!native_window_) |
+ if (!app_window_) |
return; |
extensions::ShellWindowGeometryCache* cache = |
extensions::ExtensionSystem::Get(profile())-> |
shell_window_geometry_cache(); |
- gfx::Rect bounds = native_window_->GetBounds(); |
+ gfx::Rect bounds = app_window_->GetBounds(); |
cache->SaveGeometry(extension()->id(), window_key_, bounds); |
} |