| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/views/extensions/shell_window_views.h" | 5 #include "chrome/browser/ui/views/extensions/shell_window_views.h" |
| 6 | 6 |
| 7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
| 8 #include "chrome/browser/extensions/extension_host.h" | 8 #include "chrome/browser/extensions/extension_host.h" |
| 9 #include "chrome/browser/favicon/favicon_tab_helper.h" | 9 #include "chrome/browser/favicon/favicon_tab_helper.h" |
| 10 #include "chrome/browser/ui/tab_contents/tab_contents.h" | 10 #include "chrome/browser/ui/tab_contents/tab_contents.h" |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 extension()->id()); | 338 extension()->id()); |
| 339 ui::win::SetAppIdForWindow( | 339 ui::win::SetAppIdForWindow( |
| 340 ShellIntegration::GetAppModelIdForProfile( | 340 ShellIntegration::GetAppModelIdForProfile( |
| 341 UTF8ToWide(app_name), shell_window_->profile()->GetPath()), | 341 UTF8ToWide(app_name), shell_window_->profile()->GetPath()), |
| 342 GetWidget()->GetTopLevelWidget()->GetNativeWindow()); | 342 GetWidget()->GetTopLevelWidget()->GetNativeWindow()); |
| 343 #endif | 343 #endif |
| 344 | 344 |
| 345 extension_keybinding_registry_.reset( | 345 extension_keybinding_registry_.reset( |
| 346 new ExtensionKeybindingRegistryViews(shell_window_->profile(), | 346 new ExtensionKeybindingRegistryViews(shell_window_->profile(), |
| 347 window_->GetFocusManager(), | 347 window_->GetFocusManager(), |
| 348 extensions::ExtensionKeybindingRegistry::PLATFORM_APPS_ONLY)); | 348 extensions::ExtensionKeybindingRegistry::PLATFORM_APPS_ONLY, |
| 349 shell_window_)); |
| 349 | 350 |
| 350 OnViewWasResized(); | 351 OnViewWasResized(); |
| 351 | 352 |
| 352 window_->Show(); | 353 window_->Show(); |
| 353 } | 354 } |
| 354 | 355 |
| 355 views::View* ShellWindowViews::GetInitiallyFocusedView() { | 356 views::View* ShellWindowViews::GetInitiallyFocusedView() { |
| 356 return web_view_; | 357 return web_view_; |
| 357 } | 358 } |
| 358 | 359 |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 651 ui::WindowShowState show_state) { | 652 ui::WindowShowState show_state) { |
| 652 views::WidgetDelegate::SaveWindowPlacement(bounds, show_state); | 653 views::WidgetDelegate::SaveWindowPlacement(bounds, show_state); |
| 653 shell_window_->SaveWindowPosition(); | 654 shell_window_->SaveWindowPosition(); |
| 654 } | 655 } |
| 655 | 656 |
| 656 // static | 657 // static |
| 657 NativeShellWindow* NativeShellWindow::Create( | 658 NativeShellWindow* NativeShellWindow::Create( |
| 658 ShellWindow* shell_window, const ShellWindow::CreateParams& params) { | 659 ShellWindow* shell_window, const ShellWindow::CreateParams& params) { |
| 659 return new ShellWindowViews(shell_window, params); | 660 return new ShellWindowViews(shell_window, params); |
| 660 } | 661 } |
| OLD | NEW |