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

Side by Side Diff: chrome/browser/notifications/balloon_contents_win.h

Issue 208068: Desktop Notifications UI (for windows) (Closed)
Patch Set: Created 11 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
(Empty)
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_NOTIFICATIONS_BALLOON_CONTENTS_H_
6 #define CHROME_BROWSER_NOTIFICATIONS_BALLOON_CONTENTS_H_
7
8 #include "chrome/browser/renderer_host/render_view_host_delegate.h"
9 #include "views/controls/native/native_view_host.h"
10 #include "webkit/glue/webpreferences.h"
11
12 class Balloon;
13 class Profile;
14 class SiteInstance;
15 class RenderViewHost;
16
17 class BalloonContents : public views::NativeViewHost,
18 public RenderViewHostDelegate {
19 public:
20 explicit BalloonContents(Balloon* balloon);
21
22 // Stops showing the balloon.
23 void Shutdown();
24
25 // RenderViewHostDelegate implementations.
26 virtual WebPreferences GetWebkitPrefs();
27 virtual RendererPreferences GetRendererPrefs() const;
28 virtual SiteInstance* GetSiteInstance() const;
29 virtual Profile* GetProfile() const;
30 virtual const GURL& GetURL() const;
31 virtual void RequestOpenURL(const GURL& url,
32 const GURL& referrer,
33 WindowOpenDisposition disposition);
34 virtual void RendererReady(RenderViewHost* render_view_host);
35 virtual void RendererGone(RenderViewHost* render_view_host);
36 virtual void UpdateTitle(RenderViewHost* render_view_host,
37 int32 page_id,
38 const std::wstring& title);
39 virtual int GetBrowserWindowID() const { return -1; }
40 virtual ViewType::Type GetRenderViewType() const { return ViewType::TAB_CONTEN TS; }
41
42 // Accessors.
43 RenderViewHost* render_view_host() const { return render_view_host_; }
44 const std::wstring& title() const { return title_; }
45
46 private:
47 // View overrides.
48 virtual void ViewHierarchyChanged(bool is_add, views::View *parent, views::Vie w *child);
49
50 // Initialize the view, parented to |parent|, and show it.
51 void Init(HWND parent);
52
53 // Helper functions for sending notifications.
54 void NotifyConnected();
55 void NotifyDisconnected();
56
57 // True after Init() has completed.
58 bool initialized_;
59
60 // The associated balloon.
61 Balloon* balloon_;
62
63 // The host HTML renderer.
64 RenderViewHost* render_view_host_;
65
66 // Indicates whether we should notify about disconnection of this balloon.
67 // This is used to ensure disconnection notifications only happen if
68 // a connection notification has happened and that they happen only once.
69 bool notify_disconnection_;
70
71 // The title of the balloon page.
72 std::wstring title_;
73
74 DISALLOW_COPY_AND_ASSIGN(BalloonContents);
75 };
76
77 #endif // CHROME_BROWSER_NOTIFICATIONS_BALLOON_CONTENTS_H_
OLDNEW
« no previous file with comments | « chrome/browser/browser_process_impl.cc ('k') | chrome/browser/notifications/balloon_contents_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698