| 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> |
| (...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 620 timer_.Start(FROM_HERE, | 620 timer_.Start(FROM_HERE, |
| 621 base::TimeDelta::FromMilliseconds(g_install_delay_in_ms), | 621 base::TimeDelta::FromMilliseconds(g_install_delay_in_ms), |
| 622 base::Bind(&ExtensionInstallDialogView::EnableInstallButton, | 622 base::Bind(&ExtensionInstallDialogView::EnableInstallButton, |
| 623 base::Unretained(this))); | 623 base::Unretained(this))); |
| 624 } | 624 } |
| 625 } | 625 } |
| 626 | 626 |
| 627 void ExtensionInstallDialogView::EnableInstallButton() { | 627 void ExtensionInstallDialogView::EnableInstallButton() { |
| 628 install_button_enabled_ = true; | 628 install_button_enabled_ = true; |
| 629 GetDialogClientView()->UpdateDialogButtons(); | 629 GetDialogClientView()->UpdateDialogButtons(); |
| 630 GetInitiallyFocusedView()->RequestFocus(); |
| 630 } | 631 } |
| 631 | 632 |
| 632 void ExtensionInstallDialogView::UpdateInstallResultHistogram(bool accepted) | 633 void ExtensionInstallDialogView::UpdateInstallResultHistogram(bool accepted) |
| 633 const { | 634 const { |
| 634 if (prompt_->type() == ExtensionInstallPrompt::INSTALL_PROMPT) | 635 if (prompt_->type() == ExtensionInstallPrompt::INSTALL_PROMPT) |
| 635 UMA_HISTOGRAM_BOOLEAN("Extensions.InstallPrompt.Accepted", accepted); | 636 UMA_HISTOGRAM_BOOLEAN("Extensions.InstallPrompt.Accepted", accepted); |
| 636 } | 637 } |
| 637 | 638 |
| 638 // ExpandableContainerView::DetailsView ---------------------------------------- | 639 // ExpandableContainerView::DetailsView ---------------------------------------- |
| 639 | 640 |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 790 gfx::ImageSkia icon = gfx::CreateVectorIcon( | 791 gfx::ImageSkia icon = gfx::CreateVectorIcon( |
| 791 expanded ? kCaretUpIcon : kCaretDownIcon, gfx::kChromeIconGrey); | 792 expanded ? kCaretUpIcon : kCaretDownIcon, gfx::kChromeIconGrey); |
| 792 arrow_toggle_->SetImage(views::Button::STATE_NORMAL, &icon); | 793 arrow_toggle_->SetImage(views::Button::STATE_NORMAL, &icon); |
| 793 } | 794 } |
| 794 | 795 |
| 795 // static | 796 // static |
| 796 ExtensionInstallPrompt::ShowDialogCallback | 797 ExtensionInstallPrompt::ShowDialogCallback |
| 797 ExtensionInstallPrompt::GetViewsShowDialogCallback() { | 798 ExtensionInstallPrompt::GetViewsShowDialogCallback() { |
| 798 return base::Bind(&ShowExtensionInstallDialogImpl); | 799 return base::Bind(&ShowExtensionInstallDialogImpl); |
| 799 } | 800 } |
| OLD | NEW |