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

Unified Diff: chrome/browser/three_d_api_observer.cc

Issue 22694006: Infobar system refactor. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
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: chrome/browser/three_d_api_observer.cc
===================================================================
--- chrome/browser/three_d_api_observer.cc (revision 238220)
+++ chrome/browser/three_d_api_observer.cc (working copy)
@@ -6,6 +6,7 @@
#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"
@@ -17,7 +18,8 @@
class ThreeDAPIInfoBarDelegate : public ConfirmInfoBarDelegate {
public:
- // Creates a 3D API infobar delegate and adds it to |infobar_service|.
+ // Creates a 3D API infobar and delegate and adds the infobar to
+ // |infobar_service|.
static void Create(InfoBarService* infobar_service,
const GURL& url,
content::ThreeDAPIType requester);
@@ -30,9 +32,7 @@
DISMISSAL_MAX
};
- ThreeDAPIInfoBarDelegate(InfoBarService* owner,
- const GURL& url,
- content::ThreeDAPIType requester);
+ ThreeDAPIInfoBarDelegate(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(scoped_ptr<InfoBarDelegate>(
- new ThreeDAPIInfoBarDelegate(infobar_service, url, requester)));
+ infobar_service->AddInfoBar(ConfirmInfoBarDelegate::CreateInfoBar(
+ scoped_ptr<ConfirmInfoBarDelegate>(
+ new ThreeDAPIInfoBarDelegate(url, requester))));
}
ThreeDAPIInfoBarDelegate::ThreeDAPIInfoBarDelegate(
- InfoBarService* owner,
const GURL& url,
content::ThreeDAPIType requester)
- : ConfirmInfoBarDelegate(owner),
+ : ConfirmInfoBarDelegate(),
url_(url),
requester_(requester),
message_text_queried_(false),
« no previous file with comments | « chrome/browser/task_manager/task_manager_browsertest.cc ('k') | chrome/browser/translate/options_menu_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698