| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/app_list/arc/arc_app_dialog.h" | 5 #include "chrome/browser/ui/app_list/arc/arc_app_dialog.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "chrome/browser/extensions/extension_util.h" | 10 #include "chrome/browser/extensions/extension_util.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 #include "ui/views/view.h" | 26 #include "ui/views/view.h" |
| 27 #include "ui/views/widget/widget.h" | 27 #include "ui/views/widget/widget.h" |
| 28 #include "ui/views/window/dialog_delegate.h" | 28 #include "ui/views/window/dialog_delegate.h" |
| 29 | 29 |
| 30 namespace arc { | 30 namespace arc { |
| 31 | 31 |
| 32 namespace { | 32 namespace { |
| 33 | 33 |
| 34 const int kRightColumnWidth = 210; | 34 const int kRightColumnWidth = 210; |
| 35 const int kIconSize = 64; | 35 const int kIconSize = 64; |
| 36 // Currenty Arc apps only support 48*48 native icon. | 36 // Currenty ARC apps only support 48*48 native icon. |
| 37 const int kIconSourceSize = 48; | 37 const int kIconSourceSize = 48; |
| 38 | 38 |
| 39 using ArcAppConfirmCallback = | 39 using ArcAppConfirmCallback = |
| 40 base::Callback<void(const std::string& app_id, Profile* profile)>; | 40 base::Callback<void(const std::string& app_id, Profile* profile)>; |
| 41 | 41 |
| 42 // Helper class to hold a smaller icon in a fixed-size view. | 42 // Helper class to hold a smaller icon in a fixed-size view. |
| 43 class FixedBoundarySizeImageView : public views::ImageView { | 43 class FixedBoundarySizeImageView : public views::ImageView { |
| 44 public: | 44 public: |
| 45 FixedBoundarySizeImageView() {} | 45 FixedBoundarySizeImageView() {} |
| 46 ~FixedBoundarySizeImageView() override {} | 46 ~FixedBoundarySizeImageView() override {} |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 | 288 |
| 289 bool CloseAppDialogViewAndConfirmForTest(bool confirm) { | 289 bool CloseAppDialogViewAndConfirmForTest(bool confirm) { |
| 290 if (!g_current_arc_app_dialog_view) | 290 if (!g_current_arc_app_dialog_view) |
| 291 return false; | 291 return false; |
| 292 | 292 |
| 293 g_current_arc_app_dialog_view->ConfirmOrCancelForTest(confirm); | 293 g_current_arc_app_dialog_view->ConfirmOrCancelForTest(confirm); |
| 294 return true; | 294 return true; |
| 295 } | 295 } |
| 296 | 296 |
| 297 } // namespace arc | 297 } // namespace arc |
| OLD | NEW |