Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / views / apps / app_info_dialog / app_info_panel.cc
index fd14747..4302a96 100644 (file)
@@ -4,10 +4,13 @@
 
 #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 {
 
@@ -22,6 +25,16 @@ AppInfoPanel::AppInfoPanel(Profile* profile, const extensions::Extension* app)
 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(&params);
+}
+
 views::Label* AppInfoPanel::CreateHeading(const base::string16& text) const {
   views::Label* label = new views::Label(text);
   label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
@@ -48,10 +61,6 @@ views::View* AppInfoPanel::CreateHorizontalStack(int child_spacing) const {
   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 =