Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Side by Side Diff: chrome/browser/ui/views/extensions/extension_install_dialog_view.cc

Issue 65163003: Move GetWebstoreLaunchURL and GetWebstoreItemDetailURLPrefix to extensions/common/extension_urls.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: mt Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 <vector> 5 #include <vector>
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/i18n/rtl.h" 10 #include "base/i18n/rtl.h"
11 #include "base/strings/string_util.h" 11 #include "base/strings/string_util.h"
12 #include "base/strings/utf_string_conversions.h" 12 #include "base/strings/utf_string_conversions.h"
13 #include "chrome/browser/extensions/bundle_installer.h" 13 #include "chrome/browser/extensions/bundle_installer.h"
14 #include "chrome/browser/extensions/extension_install_prompt.h" 14 #include "chrome/browser/extensions/extension_install_prompt.h"
15 #include "chrome/browser/profiles/profile.h" 15 #include "chrome/browser/profiles/profile.h"
16 #include "chrome/browser/ui/views/constrained_window_views.h" 16 #include "chrome/browser/ui/views/constrained_window_views.h"
17 #include "chrome/common/chrome_switches.h" 17 #include "chrome/common/chrome_switches.h"
18 #include "chrome/common/extensions/extension.h" 18 #include "chrome/common/extensions/extension.h"
19 #include "chrome/common/extensions/extension_constants.h"
20 #include "chrome/installer/util/browser_distribution.h" 19 #include "chrome/installer/util/browser_distribution.h"
21 #include "content/public/browser/page_navigator.h" 20 #include "content/public/browser/page_navigator.h"
22 #include "content/public/browser/web_contents.h" 21 #include "content/public/browser/web_contents.h"
22 #include "extensions/common/extension_urls.h"
23 #include "grit/chromium_strings.h" 23 #include "grit/chromium_strings.h"
24 #include "grit/generated_resources.h" 24 #include "grit/generated_resources.h"
25 #include "grit/google_chrome_strings.h" 25 #include "grit/google_chrome_strings.h"
26 #include "grit/theme_resources.h" 26 #include "grit/theme_resources.h"
27 #include "ui/base/l10n/l10n_util.h" 27 #include "ui/base/l10n/l10n_util.h"
28 #include "ui/base/resource/resource_bundle.h" 28 #include "ui/base/resource/resource_bundle.h"
29 #include "ui/gfx/animation/animation_delegate.h" 29 #include "ui/gfx/animation/animation_delegate.h"
30 #include "ui/gfx/animation/slide_animation.h" 30 #include "ui/gfx/animation/slide_animation.h"
31 #include "ui/gfx/transform.h" 31 #include "ui/gfx/transform.h"
32 #include "ui/views/border.h" 32 #include "ui/views/border.h"
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after
672 ui::ModalType ExtensionInstallDialogView::GetModalType() const { 672 ui::ModalType ExtensionInstallDialogView::GetModalType() const {
673 return ui::MODAL_TYPE_WINDOW; 673 return ui::MODAL_TYPE_WINDOW;
674 } 674 }
675 675
676 string16 ExtensionInstallDialogView::GetWindowTitle() const { 676 string16 ExtensionInstallDialogView::GetWindowTitle() const {
677 return prompt_.GetDialogTitle(); 677 return prompt_.GetDialogTitle();
678 } 678 }
679 679
680 void ExtensionInstallDialogView::LinkClicked(views::Link* source, 680 void ExtensionInstallDialogView::LinkClicked(views::Link* source,
681 int event_flags) { 681 int event_flags) {
682 GURL store_url(extension_urls::GetWebstoreItemDetailURLPrefix() + 682 GURL store_url(extensions::GetWebstoreItemDetailURLPrefix() +
683 prompt_.extension()->id()); 683 prompt_.extension()->id());
684 OpenURLParams params( 684 OpenURLParams params(
685 store_url, Referrer(), NEW_FOREGROUND_TAB, content::PAGE_TRANSITION_LINK, 685 store_url, Referrer(), NEW_FOREGROUND_TAB, content::PAGE_TRANSITION_LINK,
686 false); 686 false);
687 navigator_->OpenURL(params); 687 navigator_->OpenURL(params);
688 GetWidget()->Close(); 688 GetWidget()->Close();
689 } 689 }
690 690
691 void ExtensionInstallDialogView::Layout() { 691 void ExtensionInstallDialogView::Layout() {
692 scroll_view_->SetBounds(0, 0, width(), height()); 692 scroll_view_->SetBounds(0, 0, width(), height());
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
885 } 885 }
886 886
887 void ExpandableContainerView::ToggleDetailLevel() { 887 void ExpandableContainerView::ToggleDetailLevel() {
888 expanded_ = !expanded_; 888 expanded_ = !expanded_;
889 889
890 if (slide_animation_.IsShowing()) 890 if (slide_animation_.IsShowing())
891 slide_animation_.Hide(); 891 slide_animation_.Hide();
892 else 892 else
893 slide_animation_.Show(); 893 slide_animation_.Show();
894 } 894 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698