| Index: chrome/browser/ui/views/extensions/shell_window_views.cc
|
| diff --git a/chrome/browser/ui/views/extensions/shell_window_views.cc b/chrome/browser/ui/views/extensions/shell_window_views.cc
|
| index e4af1287fee02453ace241e6305e78bf986d52ad..3ad6acbf2fc7e05383645f5d8eba5fd7986eb996 100644
|
| --- a/chrome/browser/ui/views/extensions/shell_window_views.cc
|
| +++ b/chrome/browser/ui/views/extensions/shell_window_views.cc
|
| @@ -304,11 +304,9 @@ void ShellWindowFrameView::ButtonPressed(views::Button* sender,
|
| frame_->Close();
|
| }
|
|
|
| -ShellWindowViews::ShellWindowViews(Profile* profile,
|
| - const extensions::Extension* extension,
|
| - const GURL& url,
|
| +ShellWindowViews::ShellWindowViews(ShellWindow* shell_window,
|
| const ShellWindow::CreateParams& win_params)
|
| - : ShellWindow(profile, extension, url),
|
| + : shell_window_(shell_window),
|
| web_view_(NULL),
|
| is_fullscreen_(false),
|
| frameless_(win_params.frame == ShellWindow::CreateParams::FRAME_NONE) {
|
| @@ -325,10 +323,10 @@ ShellWindowViews::ShellWindowViews(Profile* profile,
|
| window_->SetBounds(window_bounds);
|
| #if defined(OS_WIN) && !defined(USE_AURA)
|
| std::string app_name = web_app::GenerateApplicationNameFromExtensionId(
|
| - extension->id());
|
| + extension()->id());
|
| ui::win::SetAppIdForWindow(
|
| - ShellIntegration::GetAppModelIdForProfile(UTF8ToWide(app_name),
|
| - profile->GetPath()),
|
| + ShellIntegration::GetAppModelIdForProfile(
|
| + UTF8ToWide(app_name), shell_window_->profile()->GetPath()),
|
| GetWidget()->GetTopLevelWidget()->GetNativeWindow());
|
| #endif
|
| OnViewWasResized();
|
| @@ -457,7 +455,7 @@ bool ShellWindowViews::IsAlwaysOnTop() const {
|
| }
|
|
|
| void ShellWindowViews::DeleteDelegate() {
|
| - OnNativeClose();
|
| + shell_window_->OnNativeClose();
|
| }
|
|
|
| bool ShellWindowViews::CanResize() const {
|
| @@ -480,7 +478,7 @@ views::NonClientFrameView* ShellWindowViews::CreateNonClientFrameView(
|
| }
|
|
|
| string16 ShellWindowViews::GetWindowTitle() const {
|
| - return GetTitle();
|
| + return shell_window_->GetTitle();
|
| }
|
|
|
| views::Widget* ShellWindowViews::GetWidget() {
|
| @@ -538,7 +536,8 @@ void ShellWindowViews::OnViewWasResized() {
|
| SkRegion::kUnion_Op);
|
| }
|
| }
|
| - web_contents()->GetRenderViewHost()->GetView()->SetClickthroughRegion(rgn);
|
| + if (web_contents()->GetRenderViewHost()->GetView())
|
| + web_contents()->GetRenderViewHost()->GetView()->SetClickthroughRegion(rgn);
|
| #endif
|
| }
|
|
|
| @@ -582,9 +581,7 @@ void ShellWindowViews::UpdateDraggableRegions(
|
| }
|
|
|
| // static
|
| -ShellWindow* ShellWindow::CreateImpl(Profile* profile,
|
| - const extensions::Extension* extension,
|
| - const GURL& url,
|
| - const ShellWindow::CreateParams& params) {
|
| - return new ShellWindowViews(profile, extension, url, params);
|
| +NativeShellWindow* NativeShellWindow::Create(
|
| + ShellWindow* shell_window, const ShellWindow::CreateParams& params) {
|
| + return new ShellWindowViews(shell_window, params);
|
| }
|
|
|