| 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/extension_install_dialog_view.h" | 5 #include "chrome/browser/ui/views/extensions/extension_install_dialog_view.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/callback_helpers.h" | 13 #include "base/callback_helpers.h" |
| 14 #include "base/command_line.h" | 14 #include "base/command_line.h" |
| 15 #include "base/compiler_specific.h" | 15 #include "base/compiler_specific.h" |
| 16 #include "base/i18n/rtl.h" | 16 #include "base/i18n/rtl.h" |
| 17 #include "base/macros.h" | 17 #include "base/macros.h" |
| 18 #include "base/metrics/histogram_macros.h" | 18 #include "base/metrics/histogram_macros.h" |
| 19 #include "base/strings/string_util.h" | 19 #include "base/strings/string_util.h" |
| 20 #include "base/strings/utf_string_conversions.h" | 20 #include "base/strings/utf_string_conversions.h" |
| 21 #include "chrome/app/vector_icons/vector_icons.h" |
| 21 #include "chrome/browser/browser_process.h" | 22 #include "chrome/browser/browser_process.h" |
| 22 #include "chrome/browser/extensions/api/experience_sampling_private/experience_s
ampling.h" | 23 #include "chrome/browser/extensions/api/experience_sampling_private/experience_s
ampling.h" |
| 23 #include "chrome/browser/extensions/extension_install_prompt_show_params.h" | 24 #include "chrome/browser/extensions/extension_install_prompt_show_params.h" |
| 24 #include "chrome/browser/profiles/profile.h" | 25 #include "chrome/browser/profiles/profile.h" |
| 25 #include "chrome/browser/ui/browser.h" | 26 #include "chrome/browser/ui/browser.h" |
| 26 #include "chrome/browser/ui/scoped_tabbed_browser_displayer.h" | 27 #include "chrome/browser/ui/scoped_tabbed_browser_displayer.h" |
| 27 #include "chrome/common/extensions/extension_constants.h" | 28 #include "chrome/common/extensions/extension_constants.h" |
| 28 #include "chrome/grit/generated_resources.h" | 29 #include "chrome/grit/generated_resources.h" |
| 29 #include "chrome/installer/util/browser_distribution.h" | 30 #include "chrome/installer/util/browser_distribution.h" |
| 30 #include "components/constrained_window/constrained_window_views.h" | 31 #include "components/constrained_window/constrained_window_views.h" |
| 31 #include "content/public/browser/browser_thread.h" | 32 #include "content/public/browser/browser_thread.h" |
| 32 #include "content/public/browser/page_navigator.h" | 33 #include "content/public/browser/page_navigator.h" |
| 33 #include "content/public/browser/web_contents.h" | 34 #include "content/public/browser/web_contents.h" |
| 34 #include "extensions/common/extension.h" | 35 #include "extensions/common/extension.h" |
| 35 #include "extensions/common/extension_urls.h" | 36 #include "extensions/common/extension_urls.h" |
| 36 #include "ui/base/l10n/l10n_util.h" | 37 #include "ui/base/l10n/l10n_util.h" |
| 37 #include "ui/base/resource/resource_bundle.h" | 38 #include "ui/base/resource/resource_bundle.h" |
| 38 #include "ui/gfx/color_palette.h" | 39 #include "ui/gfx/color_palette.h" |
| 39 #include "ui/gfx/paint_vector_icon.h" | 40 #include "ui/gfx/paint_vector_icon.h" |
| 40 #include "ui/gfx/text_utils.h" | 41 #include "ui/gfx/text_utils.h" |
| 41 #include "ui/gfx/vector_icons_public.h" | |
| 42 #include "ui/native_theme/common_theme.h" | 42 #include "ui/native_theme/common_theme.h" |
| 43 #include "ui/views/border.h" | 43 #include "ui/views/border.h" |
| 44 #include "ui/views/controls/button/image_button.h" | 44 #include "ui/views/controls/button/image_button.h" |
| 45 #include "ui/views/controls/image_view.h" | 45 #include "ui/views/controls/image_view.h" |
| 46 #include "ui/views/controls/label.h" | 46 #include "ui/views/controls/label.h" |
| 47 #include "ui/views/controls/link.h" | 47 #include "ui/views/controls/link.h" |
| 48 #include "ui/views/controls/scroll_view.h" | 48 #include "ui/views/controls/scroll_view.h" |
| 49 #include "ui/views/controls/separator.h" | 49 #include "ui/views/controls/separator.h" |
| 50 #include "ui/views/layout/box_layout.h" | 50 #include "ui/views/layout/box_layout.h" |
| 51 #include "ui/views/layout/grid_layout.h" | 51 #include "ui/views/layout/grid_layout.h" |
| (...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 722 expanded_ = !expanded_; | 722 expanded_ = !expanded_; |
| 723 | 723 |
| 724 if (slide_animation_.IsShowing()) | 724 if (slide_animation_.IsShowing()) |
| 725 slide_animation_.Hide(); | 725 slide_animation_.Hide(); |
| 726 else | 726 else |
| 727 slide_animation_.Show(); | 727 slide_animation_.Show(); |
| 728 } | 728 } |
| 729 | 729 |
| 730 void ExpandableContainerView::UpdateArrowToggle(bool expanded) { | 730 void ExpandableContainerView::UpdateArrowToggle(bool expanded) { |
| 731 gfx::ImageSkia icon = gfx::CreateVectorIcon( | 731 gfx::ImageSkia icon = gfx::CreateVectorIcon( |
| 732 expanded ? gfx::VectorIconId::FIND_PREV : gfx::VectorIconId::FIND_NEXT, | 732 expanded ? kCaretUpIcon : kCaretDownIcon, gfx::kChromeIconGrey); |
| 733 gfx::kChromeIconGrey); | |
| 734 arrow_toggle_->SetImage(views::Button::STATE_NORMAL, &icon); | 733 arrow_toggle_->SetImage(views::Button::STATE_NORMAL, &icon); |
| 735 } | 734 } |
| 736 | 735 |
| 737 // static | 736 // static |
| 738 ExtensionInstallPrompt::ShowDialogCallback | 737 ExtensionInstallPrompt::ShowDialogCallback |
| 739 ExtensionInstallPrompt::GetViewsShowDialogCallback() { | 738 ExtensionInstallPrompt::GetViewsShowDialogCallback() { |
| 740 return base::Bind(&ShowExtensionInstallDialogImpl); | 739 return base::Bind(&ShowExtensionInstallDialogImpl); |
| 741 } | 740 } |
| OLD | NEW |