#include "chrome/browser/ui/views/apps/app_info_dialog/app_info_panel.h"
+#include "chrome/browser/ui/browser_navigator.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/views/controls/label.h"
#include "ui/views/layout/box_layout.h"
#include "ui/views/layout/layout_constants.h"
+#include "ui/views/widget/widget.h"
+#include "url/gurl.h"
namespace {
AppInfoPanel::~AppInfoPanel() {
}
+void AppInfoPanel::Close() {
+ GetWidget()->Close();
+}
+
+void AppInfoPanel::OpenLink(const GURL& url) {
+ DCHECK(!url.is_empty());
+ chrome::NavigateParams params(profile_, url, ui::PAGE_TRANSITION_LINK);
+ chrome::Navigate(¶ms);
+}
+
views::Label* AppInfoPanel::CreateHeading(const base::string16& text) const {
views::Label* label = new views::Label(text);
label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
return vertically_stacked_view;
}
-views::View* AppInfoPanel::CreateHorizontalStack() const {
- return CreateVerticalStack(views::kRelatedControlHorizontalSpacing);
-}
-
views::View* AppInfoPanel::CreateKeyValueField(views::View* key,
views::View* value) const {
views::View* horizontal_stack =