xref: /haiku/src/apps/webpositive/CookieWindow.h (revision cbe0a0c436162d78cc3f92a305b64918c839d079)
1 /*
2  * Copyright 2015 Haiku, Inc. All rights reserved.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  *		Adrien Destugues
7  */
8 #ifndef COOKIE_WINDOW_H
9 #define COOKIE_WINDOW_H
10 
11 
12 #include <Window.h>
13 
14 #include <NetworkCookieJar.h>
15 
16 
17 class BColumnListView;
18 class BOutlineListView;
19 class BStringItem;
20 class BStringView;
21 class BString;
22 
23 
24 class CookieWindow : public BWindow {
25 public:
26 								CookieWindow(BRect frame,
27 									BPrivate::Network::BNetworkCookieJar& jar);
28 	virtual	void				MessageReceived(BMessage* message);
29 	virtual void				Show();
30 	virtual	bool				QuitRequested();
31 
32 private:
33 			void				_BuildDomainList();
34 			BStringItem*		_AddDomain(BString domain, bool fake);
35 			void				_ShowCookiesForDomain(BString domain);
36 			void				_DeleteCookies();
37 
38 private:
39 	BOutlineListView*			fDomains;
40 	BColumnListView*			fCookies;
41 	BStringView*				fHeaderView;
42 
43 	BPrivate::Network::BNetworkCookieJar&	fCookieJar;
44 };
45 
46 
47 #endif // COOKIE_WINDOW_H
48 
49