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

Side by Side Diff: chrome/browser/intents/register_intent_handler_infobar_delegate.h

Issue 7601013: Web Intents: Hook up the register intent InfoBar with the WebIntentsRegistry. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nit fixes. Created 9 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/intents/register_intent_handler_infobar_delegate.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_INTENTS_REGISTER_INTENT_HANDLER_INFOBAR_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_INTENTS_REGISTER_INTENT_HANDLER_INFOBAR_DELEGATE_H_
6 #define CHROME_BROWSER_INTENTS_REGISTER_INTENT_HANDLER_INFOBAR_DELEGATE_H_ 6 #define CHROME_BROWSER_INTENTS_REGISTER_INTENT_HANDLER_INFOBAR_DELEGATE_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/string16.h" 10 #include "base/string16.h"
11 #include "chrome/browser/intents/web_intent_data.h"
11 #include "chrome/browser/tab_contents/confirm_infobar_delegate.h" 12 #include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
12 13
14 class Profile;
13 class TabContents; 15 class TabContents;
14 16
15 // The InfoBar used to request permission for a site to be registered as an 17 // The InfoBar used to request permission for a site to be registered as an
16 // Intent handler. 18 // Intent handler.
17 class RegisterIntentHandlerInfoBarDelegate : public ConfirmInfoBarDelegate { 19 class RegisterIntentHandlerInfoBarDelegate : public ConfirmInfoBarDelegate {
18 public: 20 public:
19 // TODO(jhawkins): Pass in WebIntentData. 21 RegisterIntentHandlerInfoBarDelegate(TabContents* tab_contents,
20 explicit RegisterIntentHandlerInfoBarDelegate(TabContents* tab_contents); 22 const WebIntentData& intent);
21 23
22 // ConfirmInfoBarDelegate implementation. 24 // ConfirmInfoBarDelegate implementation.
23 virtual Type GetInfoBarType() const OVERRIDE; 25 virtual Type GetInfoBarType() const OVERRIDE;
24 virtual string16 GetMessageText() const OVERRIDE; 26 virtual string16 GetMessageText() const OVERRIDE;
25 virtual string16 GetButtonLabel(InfoBarButton button) const OVERRIDE; 27 virtual string16 GetButtonLabel(InfoBarButton button) const OVERRIDE;
28 virtual bool Accept() OVERRIDE;
26 virtual string16 GetLinkText() const OVERRIDE; 29 virtual string16 GetLinkText() const OVERRIDE;
27 virtual bool LinkClicked(WindowOpenDisposition disposition) OVERRIDE; 30 virtual bool LinkClicked(WindowOpenDisposition disposition) OVERRIDE;
28 31
29 private: 32 private:
30 // The TabContents that contains this InfoBar. Weak pointer. 33 // The TabContents that contains this InfoBar. Weak pointer.
31 TabContents* tab_contents_; 34 TabContents* tab_contents_;
32 35
36 // The profile associated with |tab_contents_|. Weak pointer.
37 Profile* profile_;
38
39 // The cached intent data bundle passed up from the renderer.
40 WebIntentData intent_;
41
33 DISALLOW_COPY_AND_ASSIGN(RegisterIntentHandlerInfoBarDelegate); 42 DISALLOW_COPY_AND_ASSIGN(RegisterIntentHandlerInfoBarDelegate);
34 }; 43 };
35 44
36 #endif // CHROME_BROWSER_INTENTS_REGISTER_INTENT_HANDLER_INFOBAR_DELEGATE_H_ 45 #endif // CHROME_BROWSER_INTENTS_REGISTER_INTENT_HANDLER_INFOBAR_DELEGATE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/intents/register_intent_handler_infobar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698