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

Side by Side Diff: chrome/browser/plugins/plugin_infobar_delegates.cc

Issue 1581473002: Remove base/win/metro.{cc|h} and some associated code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixes Created 4 years, 11 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 (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/plugins/plugin_infobar_delegates.h" 5 #include "chrome/browser/plugins/plugin_infobar_delegates.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 12 matching lines...) Expand all
23 #include "components/infobars/core/infobar.h" 23 #include "components/infobars/core/infobar.h"
24 #include "content/public/browser/render_process_host.h" 24 #include "content/public/browser/render_process_host.h"
25 #include "content/public/browser/render_view_host.h" 25 #include "content/public/browser/render_view_host.h"
26 #include "content/public/browser/user_metrics.h" 26 #include "content/public/browser/user_metrics.h"
27 #include "content/public/browser/web_contents.h" 27 #include "content/public/browser/web_contents.h"
28 #include "grit/components_strings.h" 28 #include "grit/components_strings.h"
29 #include "grit/theme_resources.h" 29 #include "grit/theme_resources.h"
30 #include "ui/base/l10n/l10n_util.h" 30 #include "ui/base/l10n/l10n_util.h"
31 31
32 #if defined(ENABLE_PLUGIN_INSTALLATION) 32 #if defined(ENABLE_PLUGIN_INSTALLATION)
33 #if defined(OS_WIN)
34 #include "base/win/metro.h"
35 #endif
36 #include "chrome/browser/plugins/plugin_installer.h" 33 #include "chrome/browser/plugins/plugin_installer.h"
37 #endif 34 #endif
38 35
39 #if defined(OS_WIN) 36 #if defined(OS_WIN)
40 #include <shellapi.h> 37 #include <shellapi.h>
41 #include "ui/base/win/shell.h" 38 #include "ui/base/win/shell.h"
42 39
43 #if defined(USE_AURA) 40 #if defined(USE_AURA)
44 #include "ui/aura/remote_window_tree_host_win.h" 41 #include "ui/aura/remote_window_tree_host_win.h"
45 #endif 42 #endif
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 ShellIntegration::GetStartMenuShortcut(exe_path)); 267 ShellIntegration::GetStartMenuShortcut(exe_path));
271 268
272 // Actually launching the process needs to happen in the metro viewer, 269 // Actually launching the process needs to happen in the metro viewer,
273 // otherwise it won't automatically transition to desktop. So we have 270 // otherwise it won't automatically transition to desktop. So we have
274 // to send an IPC to the viewer to do the ShellExecute. 271 // to send an IPC to the viewer to do the ShellExecute.
275 aura::RemoteWindowTreeHostWin::Instance()->HandleOpenURLOnDesktop( 272 aura::RemoteWindowTreeHostWin::Instance()->HandleOpenURLOnDesktop(
276 shortcut_path, url); 273 shortcut_path, url);
277 } 274 }
278 275
279 bool PluginMetroModeInfoBarDelegate::Accept() { 276 bool PluginMetroModeInfoBarDelegate::Accept() {
280 chrome::AttemptRestartToDesktopMode(); 277 // TODO(scottmg): Remove this entire class http://crbug.com/558054.
281 return true; 278 return true;
282 } 279 }
283 280
284 base::string16 PluginMetroModeInfoBarDelegate::GetLinkText() const { 281 base::string16 PluginMetroModeInfoBarDelegate::GetLinkText() const {
285 return l10n_util::GetStringUTF16(IDS_LEARN_MORE); 282 return l10n_util::GetStringUTF16(IDS_LEARN_MORE);
286 } 283 }
287 284
288 GURL PluginMetroModeInfoBarDelegate::GetLinkURL() const { 285 GURL PluginMetroModeInfoBarDelegate::GetLinkURL() const {
289 return GURL( 286 return GURL(
290 (mode_ == MISSING_PLUGIN) 287 (mode_ == MISSING_PLUGIN)
291 ? "https://support.google.com/chrome/?p=ib_display_in_desktop" 288 ? "https://support.google.com/chrome/?p=ib_display_in_desktop"
292 : "https://support.google.com/chrome/?p=ib_redirect_to_desktop"); 289 : "https://support.google.com/chrome/?p=ib_redirect_to_desktop");
293 } 290 }
294 291
295 #endif // defined(OS_WIN) 292 #endif // defined(OS_WIN)
296 293
297 #endif // defined(ENABLE_PLUGIN_INSTALLATION) 294 #endif // defined(ENABLE_PLUGIN_INSTALLATION)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698