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

Unified Diff: trunk/src/chrome/browser/three_d_api_observer.cc

Issue 102163002: Revert 238283 "Infobar system refactor." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years 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 side-by-side diff with in-line comments
Download patch
Index: trunk/src/chrome/browser/three_d_api_observer.cc
===================================================================
--- trunk/src/chrome/browser/three_d_api_observer.cc (revision 238401)
+++ trunk/src/chrome/browser/three_d_api_observer.cc (working copy)
@@ -6,7 +6,6 @@
#include "base/metrics/histogram.h"
#include "chrome/browser/infobars/confirm_infobar_delegate.h"
-#include "chrome/browser/infobars/infobar.h"
#include "chrome/browser/infobars/infobar_service.h"
#include "chrome/browser/tab_contents/tab_util.h"
#include "content/public/browser/gpu_data_manager.h"
@@ -18,8 +17,7 @@
class ThreeDAPIInfoBarDelegate : public ConfirmInfoBarDelegate {
public:
- // Creates a 3D API infobar and delegate and adds the infobar to
- // |infobar_service|.
+ // Creates a 3D API infobar delegate and adds it to |infobar_service|.
static void Create(InfoBarService* infobar_service,
const GURL& url,
content::ThreeDAPIType requester);
@@ -32,7 +30,9 @@
DISMISSAL_MAX
};
- ThreeDAPIInfoBarDelegate(const GURL& url, content::ThreeDAPIType requester);
+ ThreeDAPIInfoBarDelegate(InfoBarService* owner,
+ const GURL& url,
+ content::ThreeDAPIType requester);
virtual ~ThreeDAPIInfoBarDelegate();
// ConfirmInfoBarDelegate:
@@ -61,15 +61,15 @@
content::ThreeDAPIType requester) {
if (!infobar_service)
return; // NULL for apps.
- infobar_service->AddInfoBar(ConfirmInfoBarDelegate::CreateInfoBar(
- scoped_ptr<ConfirmInfoBarDelegate>(
- new ThreeDAPIInfoBarDelegate(url, requester))));
+ infobar_service->AddInfoBar(scoped_ptr<InfoBarDelegate>(
+ new ThreeDAPIInfoBarDelegate(infobar_service, url, requester)));
}
ThreeDAPIInfoBarDelegate::ThreeDAPIInfoBarDelegate(
+ InfoBarService* owner,
const GURL& url,
content::ThreeDAPIType requester)
- : ConfirmInfoBarDelegate(),
+ : ConfirmInfoBarDelegate(owner),
url_(url),
requester_(requester),
message_text_queried_(false),

Powered by Google App Engine
This is Rietveld 408576698