OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "apps/shell_window.h" | 5 #include "apps/shell_window.h" |
6 | 6 |
7 #include "apps/native_app_window.h" | 7 #include "apps/native_app_window.h" |
8 #include "apps/shell_window_geometry_cache.h" | 8 #include "apps/shell_window_geometry_cache.h" |
9 #include "apps/shell_window_registry.h" | 9 #include "apps/shell_window_registry.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
450 app_icon_image_.reset(new extensions::IconImage( | 450 app_icon_image_.reset(new extensions::IconImage( |
451 profile(), | 451 profile(), |
452 extension(), | 452 extension(), |
453 extensions::IconsInfo::GetIcons(extension()), | 453 extensions::IconsInfo::GetIcons(extension()), |
454 delegate_->PreferredIconSize(), | 454 delegate_->PreferredIconSize(), |
455 extensions::IconsInfo::GetDefaultAppIcon(), | 455 extensions::IconsInfo::GetDefaultAppIcon(), |
456 this)); | 456 this)); |
457 | 457 |
458 // Triggers actual image loading with 1x resources. The 2x resource will | 458 // Triggers actual image loading with 1x resources. The 2x resource will |
459 // be handled by IconImage class when requested. | 459 // be handled by IconImage class when requested. |
460 app_icon_image_->image_skia().GetRepresentation(1.0f); | 460 app_icon_image_->image_skia().GetRepresentation(ui::SCALE_FACTOR_100P); |
461 } | 461 } |
462 | 462 |
463 void ShellWindow::CloseContents(WebContents* contents) { | 463 void ShellWindow::CloseContents(WebContents* contents) { |
464 native_app_window_->Close(); | 464 native_app_window_->Close(); |
465 } | 465 } |
466 | 466 |
467 bool ShellWindow::ShouldSuppressDialogs() { | 467 bool ShellWindow::ShouldSuppressDialogs() { |
468 return true; | 468 return true; |
469 } | 469 } |
470 | 470 |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
650 region.bounds.x(), | 650 region.bounds.x(), |
651 region.bounds.y(), | 651 region.bounds.y(), |
652 region.bounds.right(), | 652 region.bounds.right(), |
653 region.bounds.bottom(), | 653 region.bounds.bottom(), |
654 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); | 654 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); |
655 } | 655 } |
656 return sk_region; | 656 return sk_region; |
657 } | 657 } |
658 | 658 |
659 } // namespace apps | 659 } // namespace apps |
OLD | NEW |