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/common/extensions/extension.h" | 9 #include "chrome/common/extensions/extension.h" |
10 #include "content/public/browser/render_view_host.h" | 10 #include "content/public/browser/render_view_host.h" |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 | 391 |
392 gfx::NativeWindow ShellWindowViews::GetNativeWindow() { | 392 gfx::NativeWindow ShellWindowViews::GetNativeWindow() { |
393 return window_->GetNativeWindow(); | 393 return window_->GetNativeWindow(); |
394 } | 394 } |
395 | 395 |
396 gfx::Rect ShellWindowViews::GetRestoredBounds() const { | 396 gfx::Rect ShellWindowViews::GetRestoredBounds() const { |
397 return window_->GetRestoredBounds(); | 397 return window_->GetRestoredBounds(); |
398 } | 398 } |
399 | 399 |
400 gfx::Rect ShellWindowViews::GetBounds() const { | 400 gfx::Rect ShellWindowViews::GetBounds() const { |
401 return window_->GetWindowScreenBounds(); | 401 return window_->GetWindowBoundsInScreen(); |
402 } | 402 } |
403 | 403 |
404 void ShellWindowViews::Show() { | 404 void ShellWindowViews::Show() { |
405 if (window_->IsVisible()) { | 405 if (window_->IsVisible()) { |
406 window_->Activate(); | 406 window_->Activate(); |
407 return; | 407 return; |
408 } | 408 } |
409 | 409 |
410 window_->Show(); | 410 window_->Show(); |
411 } | 411 } |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
554 window_->UpdateWindowTitle(); | 554 window_->UpdateWindowTitle(); |
555 } | 555 } |
556 | 556 |
557 // static | 557 // static |
558 ShellWindow* ShellWindow::CreateImpl(Profile* profile, | 558 ShellWindow* ShellWindow::CreateImpl(Profile* profile, |
559 const extensions::Extension* extension, | 559 const extensions::Extension* extension, |
560 const GURL& url, | 560 const GURL& url, |
561 const ShellWindow::CreateParams& params) { | 561 const ShellWindow::CreateParams& params) { |
562 return new ShellWindowViews(profile, extension, url, params); | 562 return new ShellWindowViews(profile, extension, url, params); |
563 } | 563 } |
OLD | NEW |