| 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/views/extensions/extension_keybinding_registry_views
.h" | 10 #include "chrome/browser/ui/views/extensions/extension_keybinding_registry_views
.h" |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 GetWidget()->GetTopLevelWidget()->GetNativeWindow()); | 346 GetWidget()->GetTopLevelWidget()->GetNativeWindow()); |
| 347 #endif | 347 #endif |
| 348 | 348 |
| 349 extension_keybinding_registry_.reset( | 349 extension_keybinding_registry_.reset( |
| 350 new ExtensionKeybindingRegistryViews(shell_window_->profile(), | 350 new ExtensionKeybindingRegistryViews(shell_window_->profile(), |
| 351 window_->GetFocusManager(), | 351 window_->GetFocusManager(), |
| 352 extensions::ExtensionKeybindingRegistry::PLATFORM_APPS_ONLY, | 352 extensions::ExtensionKeybindingRegistry::PLATFORM_APPS_ONLY, |
| 353 shell_window_)); | 353 shell_window_)); |
| 354 | 354 |
| 355 OnViewWasResized(); | 355 OnViewWasResized(); |
| 356 | |
| 357 window_->Show(); | |
| 358 } | 356 } |
| 359 | 357 |
| 360 views::View* ShellWindowViews::GetInitiallyFocusedView() { | 358 views::View* ShellWindowViews::GetInitiallyFocusedView() { |
| 361 return web_view_; | 359 return web_view_; |
| 362 } | 360 } |
| 363 | 361 |
| 364 bool ShellWindowViews::ShouldDescendIntoChildForEventHandling( | 362 bool ShellWindowViews::ShouldDescendIntoChildForEventHandling( |
| 365 gfx::NativeView child, | 363 gfx::NativeView child, |
| 366 const gfx::Point& location) { | 364 const gfx::Point& location) { |
| 367 #if defined(USE_AURA) | 365 #if defined(USE_AURA) |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 448 | 446 |
| 449 window_->Show(); | 447 window_->Show(); |
| 450 } | 448 } |
| 451 | 449 |
| 452 void ShellWindowViews::ShowInactive() { | 450 void ShellWindowViews::ShowInactive() { |
| 453 if (window_->IsVisible()) | 451 if (window_->IsVisible()) |
| 454 return; | 452 return; |
| 455 window_->ShowInactive(); | 453 window_->ShowInactive(); |
| 456 } | 454 } |
| 457 | 455 |
| 456 void ShellWindowViews::Hide() { |
| 457 window_->Hide(); |
| 458 } |
| 459 |
| 458 void ShellWindowViews::Close() { | 460 void ShellWindowViews::Close() { |
| 459 window_->Close(); | 461 window_->Close(); |
| 460 } | 462 } |
| 461 | 463 |
| 462 void ShellWindowViews::Activate() { | 464 void ShellWindowViews::Activate() { |
| 463 window_->Activate(); | 465 window_->Activate(); |
| 464 } | 466 } |
| 465 | 467 |
| 466 void ShellWindowViews::Deactivate() { | 468 void ShellWindowViews::Deactivate() { |
| 467 window_->Deactivate(); | 469 window_->Deactivate(); |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 647 ui::WindowShowState show_state) { | 649 ui::WindowShowState show_state) { |
| 648 views::WidgetDelegate::SaveWindowPlacement(bounds, show_state); | 650 views::WidgetDelegate::SaveWindowPlacement(bounds, show_state); |
| 649 shell_window_->SaveWindowPosition(); | 651 shell_window_->SaveWindowPosition(); |
| 650 } | 652 } |
| 651 | 653 |
| 652 // static | 654 // static |
| 653 NativeShellWindow* NativeShellWindow::Create( | 655 NativeShellWindow* NativeShellWindow::Create( |
| 654 ShellWindow* shell_window, const ShellWindow::CreateParams& params) { | 656 ShellWindow* shell_window, const ShellWindow::CreateParams& params) { |
| 655 return new ShellWindowViews(shell_window, params); | 657 return new ShellWindowViews(shell_window, params); |
| 656 } | 658 } |
| OLD | NEW |