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

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

Issue 562603002: Move PageTransition from //content/public/common to //ui/base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 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
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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/process/process.h" 9 #include "base/process/process.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 item->AddObserver(this); 125 item->AddObserver(this);
126 } 126 }
127 127
128 void PluginInstaller::OpenDownloadURL(const GURL& plugin_url, 128 void PluginInstaller::OpenDownloadURL(const GURL& plugin_url,
129 content::WebContents* web_contents) { 129 content::WebContents* web_contents) {
130 DCHECK_EQ(INSTALLER_STATE_IDLE, state_); 130 DCHECK_EQ(INSTALLER_STATE_IDLE, state_);
131 web_contents->OpenURL(content::OpenURLParams( 131 web_contents->OpenURL(content::OpenURLParams(
132 plugin_url, 132 plugin_url,
133 content::Referrer(web_contents->GetURL(), 133 content::Referrer(web_contents->GetURL(),
134 blink::WebReferrerPolicyDefault), 134 blink::WebReferrerPolicyDefault),
135 NEW_FOREGROUND_TAB, content::PAGE_TRANSITION_TYPED, false)); 135 NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_TYPED, false));
136 FOR_EACH_OBSERVER(PluginInstallerObserver, observers_, DownloadFinished()); 136 FOR_EACH_OBSERVER(PluginInstallerObserver, observers_, DownloadFinished());
137 } 137 }
138 138
139 void PluginInstaller::DownloadError(const std::string& msg) { 139 void PluginInstaller::DownloadError(const std::string& msg) {
140 DCHECK_EQ(INSTALLER_STATE_DOWNLOADING, state_); 140 DCHECK_EQ(INSTALLER_STATE_DOWNLOADING, state_);
141 state_ = INSTALLER_STATE_IDLE; 141 state_ = INSTALLER_STATE_IDLE;
142 FOR_EACH_OBSERVER(PluginInstallerObserver, observers_, DownloadError(msg)); 142 FOR_EACH_OBSERVER(PluginInstallerObserver, observers_, DownloadError(msg));
143 } 143 }
144 144
145 void PluginInstaller::DownloadCancelled() { 145 void PluginInstaller::DownloadCancelled() {
146 DCHECK_EQ(INSTALLER_STATE_DOWNLOADING, state_); 146 DCHECK_EQ(INSTALLER_STATE_DOWNLOADING, state_);
147 state_ = INSTALLER_STATE_IDLE; 147 state_ = INSTALLER_STATE_IDLE;
148 FOR_EACH_OBSERVER(PluginInstallerObserver, observers_, DownloadCancelled()); 148 FOR_EACH_OBSERVER(PluginInstallerObserver, observers_, DownloadCancelled());
149 } 149 }
OLDNEW
« no previous file with comments | « chrome/browser/plugins/plugin_infobar_delegates.cc ('k') | chrome/browser/plugins/plugin_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698