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/native_app_window_views.h" | 5 #include "chrome/browser/ui/views/extensions/native_app_window_views.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/threading/sequenced_worker_pool.h" | 10 #include "base/threading/sequenced_worker_pool.h" |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 | 294 |
295 bool NativeAppWindowViews::IsFullscreen() const { | 295 bool NativeAppWindowViews::IsFullscreen() const { |
296 return window_->IsFullscreen(); | 296 return window_->IsFullscreen(); |
297 } | 297 } |
298 | 298 |
299 gfx::NativeWindow NativeAppWindowViews::GetNativeWindow() { | 299 gfx::NativeWindow NativeAppWindowViews::GetNativeWindow() { |
300 return window_->GetNativeWindow(); | 300 return window_->GetNativeWindow(); |
301 } | 301 } |
302 | 302 |
303 gfx::Rect NativeAppWindowViews::GetRestoredBounds() const { | 303 gfx::Rect NativeAppWindowViews::GetRestoredBounds() const { |
304 return window_->GetRestoredBounds(); | 304 gfx::Rect bounds = window_->GetRestoredBounds(); |
| 305 bounds.Inset(GetFrameInsets()); |
| 306 return bounds; |
305 } | 307 } |
306 | 308 |
307 gfx::Rect NativeAppWindowViews::GetBounds() const { | 309 gfx::Rect NativeAppWindowViews::GetBounds() const { |
308 return window_->GetWindowBoundsInScreen(); | 310 return window_->GetWindowBoundsInScreen(); |
309 } | 311 } |
310 | 312 |
311 void NativeAppWindowViews::Show() { | 313 void NativeAppWindowViews::Show() { |
312 if (window_->IsVisible()) { | 314 if (window_->IsVisible()) { |
313 window_->Activate(); | 315 window_->Activate(); |
314 return; | 316 return; |
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
698 } | 700 } |
699 | 701 |
700 //------------------------------------------------------------------------------ | 702 //------------------------------------------------------------------------------ |
701 // NativeAppWindow::Create | 703 // NativeAppWindow::Create |
702 | 704 |
703 // static | 705 // static |
704 NativeAppWindow* NativeAppWindow::Create( | 706 NativeAppWindow* NativeAppWindow::Create( |
705 ShellWindow* shell_window, const ShellWindow::CreateParams& params) { | 707 ShellWindow* shell_window, const ShellWindow::CreateParams& params) { |
706 return new NativeAppWindowViews(shell_window, params); | 708 return new NativeAppWindowViews(shell_window, params); |
707 } | 709 } |
OLD | NEW |