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 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 frame_->Restore(); | 393 frame_->Restore(); |
394 else if (sender == minimize_button_) | 394 else if (sender == minimize_button_) |
395 frame_->Minimize(); | 395 frame_->Minimize(); |
396 } | 396 } |
397 | 397 |
398 ShellWindowViews::ShellWindowViews(ShellWindow* shell_window, | 398 ShellWindowViews::ShellWindowViews(ShellWindow* shell_window, |
399 const ShellWindow::CreateParams& win_params) | 399 const ShellWindow::CreateParams& win_params) |
400 : shell_window_(shell_window), | 400 : shell_window_(shell_window), |
401 web_view_(NULL), | 401 web_view_(NULL), |
402 is_fullscreen_(false), | 402 is_fullscreen_(false), |
403 frameless_(win_params.frame == ShellWindow::CreateParams::FRAME_NONE) { | 403 frameless_(win_params.frame == ShellWindow::FRAME_NONE) { |
404 window_ = new views::Widget; | 404 window_ = new views::Widget; |
405 views::Widget::InitParams params(views::Widget::InitParams::TYPE_WINDOW); | 405 views::Widget::InitParams params(views::Widget::InitParams::TYPE_WINDOW); |
406 params.delegate = this; | 406 params.delegate = this; |
407 params.remove_standard_frame = true; | 407 params.remove_standard_frame = true; |
408 params.use_system_default_icon = true; | 408 params.use_system_default_icon = true; |
409 minimum_size_ = win_params.minimum_size; | 409 minimum_size_ = win_params.minimum_size; |
410 maximum_size_ = win_params.maximum_size; | 410 maximum_size_ = win_params.maximum_size; |
411 window_->Init(params); | 411 window_->Init(params); |
412 gfx::Rect window_bounds = | 412 gfx::Rect window_bounds = |
413 window_->non_client_view()->GetWindowBoundsForClientBounds( | 413 window_->non_client_view()->GetWindowBoundsForClientBounds( |
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
734 ui::WindowShowState show_state) { | 734 ui::WindowShowState show_state) { |
735 views::WidgetDelegate::SaveWindowPlacement(bounds, show_state); | 735 views::WidgetDelegate::SaveWindowPlacement(bounds, show_state); |
736 shell_window_->SaveWindowPosition(); | 736 shell_window_->SaveWindowPosition(); |
737 } | 737 } |
738 | 738 |
739 // static | 739 // static |
740 NativeShellWindow* NativeShellWindow::Create( | 740 NativeShellWindow* NativeShellWindow::Create( |
741 ShellWindow* shell_window, const ShellWindow::CreateParams& params) { | 741 ShellWindow* shell_window, const ShellWindow::CreateParams& params) { |
742 return new ShellWindowViews(shell_window, params); | 742 return new ShellWindowViews(shell_window, params); |
743 } | 743 } |
OLD | NEW |