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

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

Issue 2248873002: Convert WindowOpenDisposition to an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 3 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
« no previous file with comments | « chrome/browser/platform_util_chromeos.cc ('k') | chrome/browser/plugins/plugin_observer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_installer.h" 5 #include "chrome/browser/plugins/plugin_installer.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 return; 124 return;
125 } 125 }
126 item->SetOpenWhenComplete(true); 126 item->SetOpenWhenComplete(true);
127 item->AddObserver(this); 127 item->AddObserver(this);
128 } 128 }
129 129
130 void PluginInstaller::OpenDownloadURL(const GURL& plugin_url, 130 void PluginInstaller::OpenDownloadURL(const GURL& plugin_url,
131 content::WebContents* web_contents) { 131 content::WebContents* web_contents) {
132 DCHECK_EQ(INSTALLER_STATE_IDLE, state_); 132 DCHECK_EQ(INSTALLER_STATE_IDLE, state_);
133 web_contents->OpenURL(content::OpenURLParams( 133 web_contents->OpenURL(content::OpenURLParams(
134 plugin_url, 134 plugin_url, content::Referrer(web_contents->GetURL(),
135 content::Referrer(web_contents->GetURL(), 135 blink::WebReferrerPolicyDefault),
136 blink::WebReferrerPolicyDefault), 136 WindowOpenDisposition::NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_TYPED,
137 NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_TYPED, false)); 137 false));
138 FOR_EACH_OBSERVER(PluginInstallerObserver, observers_, DownloadFinished()); 138 FOR_EACH_OBSERVER(PluginInstallerObserver, observers_, DownloadFinished());
139 } 139 }
140 140
141 void PluginInstaller::DownloadError(const std::string& msg) { 141 void PluginInstaller::DownloadError(const std::string& msg) {
142 DCHECK_EQ(INSTALLER_STATE_DOWNLOADING, state_); 142 DCHECK_EQ(INSTALLER_STATE_DOWNLOADING, state_);
143 state_ = INSTALLER_STATE_IDLE; 143 state_ = INSTALLER_STATE_IDLE;
144 FOR_EACH_OBSERVER(PluginInstallerObserver, observers_, DownloadError(msg)); 144 FOR_EACH_OBSERVER(PluginInstallerObserver, observers_, DownloadError(msg));
145 } 145 }
146 146
147 void PluginInstaller::DownloadCancelled() { 147 void PluginInstaller::DownloadCancelled() {
148 DCHECK_EQ(INSTALLER_STATE_DOWNLOADING, state_); 148 DCHECK_EQ(INSTALLER_STATE_DOWNLOADING, state_);
149 state_ = INSTALLER_STATE_IDLE; 149 state_ = INSTALLER_STATE_IDLE;
150 FOR_EACH_OBSERVER(PluginInstallerObserver, observers_, DownloadCancelled()); 150 FOR_EACH_OBSERVER(PluginInstallerObserver, observers_, DownloadCancelled());
151 } 151 }
OLDNEW
« no previous file with comments | « chrome/browser/platform_util_chromeos.cc ('k') | chrome/browser/plugins/plugin_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698