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

Side by Side Diff: chrome/browser/ui/extensions/app_metro_infobar_delegate_win.cc

Issue 13947002: Update App Launcher icons, splitting for Chromium, Chrome, Canary. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebase Created 7 years, 8 months 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/extensions/app_metro_infobar_delegate_win.h" 5 #include "chrome/browser/ui/extensions/app_metro_infobar_delegate_win.h"
6 6
7 #include "apps/app_launch_for_metro_restart_win.h" 7 #include "apps/app_launch_for_metro_restart_win.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
11 #include "chrome/browser/browser_process.h" 11 #include "chrome/browser/browser_process.h"
12 #include "chrome/browser/profiles/profile.h" 12 #include "chrome/browser/profiles/profile.h"
13 #include "chrome/browser/ui/app_list/app_list_service_win.h"
13 #include "chrome/browser/ui/browser.h" 14 #include "chrome/browser/ui/browser.h"
14 #include "chrome/browser/ui/browser_finder.h" 15 #include "chrome/browser/ui/browser_finder.h"
15 #include "chrome/browser/ui/browser_window.h" 16 #include "chrome/browser/ui/browser_window.h"
16 #include "chrome/browser/ui/host_desktop.h" 17 #include "chrome/browser/ui/host_desktop.h"
17 #include "chrome/browser/ui/metro_chrome_win.h" 18 #include "chrome/browser/ui/metro_chrome_win.h"
18 #include "chrome/common/pref_names.h" 19 #include "chrome/common/pref_names.h"
19 #include "content/public/browser/web_contents.h" 20 #include "content/public/browser/web_contents.h"
20 #include "content/public/common/url_constants.h" 21 #include "content/public/common/url_constants.h"
21 #include "grit/generated_resources.h" 22 #include "grit/generated_resources.h"
22 #include "grit/google_chrome_strings.h" 23 #include "grit/google_chrome_strings.h"
23 #include "grit/theme_resources.h"
24 #include "ui/base/l10n/l10n_util.h" 24 #include "ui/base/l10n/l10n_util.h"
25 #include "ui/base/resource/resource_bundle.h" 25 #include "ui/base/resource/resource_bundle.h"
26 #include "win8/util/win8_util.h" 26 #include "win8/util/win8_util.h"
27 27
28 namespace chrome { 28 namespace chrome {
29 29
30 // static 30 // static
31 void AppMetroInfoBarDelegateWin::Create( 31 void AppMetroInfoBarDelegateWin::Create(
32 Profile* profile, Mode mode, const std::string& extension_id) { 32 Profile* profile, Mode mode, const std::string& extension_id) {
33 DCHECK(win8::IsSingleWindowMetroMode()); 33 DCHECK(win8::IsSingleWindowMetroMode());
(...skipping 30 matching lines...) Expand all
64 const std::string& extension_id) 64 const std::string& extension_id)
65 : ConfirmInfoBarDelegate(info_bar_service), 65 : ConfirmInfoBarDelegate(info_bar_service),
66 mode_(mode), 66 mode_(mode),
67 extension_id_(extension_id) { 67 extension_id_(extension_id) {
68 DCHECK_EQ(mode_ == SHOW_APP_LIST, extension_id_.empty()); 68 DCHECK_EQ(mode_ == SHOW_APP_LIST, extension_id_.empty());
69 } 69 }
70 70
71 AppMetroInfoBarDelegateWin::~AppMetroInfoBarDelegateWin() {} 71 AppMetroInfoBarDelegateWin::~AppMetroInfoBarDelegateWin() {}
72 72
73 gfx::Image* AppMetroInfoBarDelegateWin::GetIcon() const { 73 gfx::Image* AppMetroInfoBarDelegateWin::GetIcon() const {
74 return &ResourceBundle::GetSharedInstance().GetNativeImageNamed(IDR_APP_LIST); 74 return &ResourceBundle::GetSharedInstance().GetNativeImageNamed(
75 chrome::GetAppListIconResourceId());
75 } 76 }
76 77
77 string16 AppMetroInfoBarDelegateWin::GetMessageText() const { 78 string16 AppMetroInfoBarDelegateWin::GetMessageText() const {
78 return l10n_util::GetStringUTF16(mode_ == SHOW_APP_LIST ? 79 return l10n_util::GetStringUTF16(mode_ == SHOW_APP_LIST ?
79 IDS_WIN8_INFOBAR_DESKTOP_RESTART_FOR_APP_LIST : 80 IDS_WIN8_INFOBAR_DESKTOP_RESTART_FOR_APP_LIST :
80 IDS_WIN8_INFOBAR_DESKTOP_RESTART_FOR_PACKAGED_APP); 81 IDS_WIN8_INFOBAR_DESKTOP_RESTART_FOR_PACKAGED_APP);
81 } 82 }
82 83
83 int AppMetroInfoBarDelegateWin::GetButtons() const { 84 int AppMetroInfoBarDelegateWin::GetButtons() const {
84 return BUTTON_OK | BUTTON_CANCEL; 85 return BUTTON_OK | BUTTON_CANCEL;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 content::OpenURLParams params( 122 content::OpenURLParams params(
122 GURL("https://support.google.com/chrome/?p=ib_redirect_to_desktop"), 123 GURL("https://support.google.com/chrome/?p=ib_redirect_to_desktop"),
123 content::Referrer(), 124 content::Referrer(),
124 (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, 125 (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition,
125 content::PAGE_TRANSITION_LINK, false); 126 content::PAGE_TRANSITION_LINK, false);
126 owner()->GetWebContents()->OpenURL(params); 127 owner()->GetWebContents()->OpenURL(params);
127 return false; 128 return false;
128 } 129 }
129 130
130 } // namespace chrome 131 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/app_list_service_win.cc ('k') | chrome/browser/ui/views/app_list/app_list_controller_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698