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

Side by Side Diff: chrome/renderer/notification_provider.h

Issue 6366019: Part 1 of repairing regressions to my old clang check plugins so Nico can (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove Nico's changes that I patched in for testing. Created 9 years, 11 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_RENDERER_NOTIFICATION_PROVIDER_H_ 5 #ifndef CHROME_RENDERER_NOTIFICATION_PROVIDER_H_
6 #define CHROME_RENDERER_NOTIFICATION_PROVIDER_H_ 6 #define CHROME_RENDERER_NOTIFICATION_PROVIDER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "chrome/common/desktop_notifications/active_notification_tracker.h" 9 #include "chrome/common/desktop_notifications/active_notification_tracker.h"
10 #include "chrome/renderer/render_view_observer.h" 10 #include "chrome/renderer/render_view_observer.h"
11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNotification.h" 11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNotification.h"
12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNotificationPresen ter.h" 12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNotificationPresen ter.h"
13 13
14 namespace WebKit { 14 namespace WebKit {
15 class WebNotificationPermissionCallback; 15 class WebNotificationPermissionCallback;
16 } 16 }
17 17
18 // NotificationProvider class is owned by the RenderView. Only 18 // NotificationProvider class is owned by the RenderView. Only
19 // to be used on the main thread. 19 // to be used on the main thread.
20 class NotificationProvider : public RenderViewObserver, 20 class NotificationProvider : public RenderViewObserver,
21 public WebKit::WebNotificationPresenter { 21 public WebKit::WebNotificationPresenter {
22 public: 22 public:
23 explicit NotificationProvider(RenderView* render_view); 23 explicit NotificationProvider(RenderView* render_view);
24 virtual ~NotificationProvider(); 24 virtual ~NotificationProvider();
25 25
26 private: 26 private:
27 // RenderView::Observer implementation. 27 // RenderView::Observer implementation.
28 bool OnMessageReceived(const IPC::Message& message); 28 virtual bool OnMessageReceived(const IPC::Message& message);
29 29
30 // WebKit::WebNotificationPresenter interface. 30 // WebKit::WebNotificationPresenter interface.
31 virtual bool show(const WebKit::WebNotification& proxy); 31 virtual bool show(const WebKit::WebNotification& proxy);
32 virtual void cancel(const WebKit::WebNotification& proxy); 32 virtual void cancel(const WebKit::WebNotification& proxy);
33 virtual void objectDestroyed(const WebKit::WebNotification& proxy); 33 virtual void objectDestroyed(const WebKit::WebNotification& proxy);
34 virtual WebKit::WebNotificationPresenter::Permission checkPermission( 34 virtual WebKit::WebNotificationPresenter::Permission checkPermission(
35 const WebKit::WebURL& url); 35 const WebKit::WebURL& url);
36 virtual void requestPermission(const WebKit::WebSecurityOrigin& origin, 36 virtual void requestPermission(const WebKit::WebSecurityOrigin& origin,
37 WebKit::WebNotificationPermissionCallback* callback); 37 WebKit::WebNotificationPermissionCallback* callback);
38 38
(...skipping 10 matching lines...) Expand all
49 void OnNavigate(); 49 void OnNavigate();
50 50
51 // A tracker object which manages the active notifications and the IDs 51 // A tracker object which manages the active notifications and the IDs
52 // that are used to refer to them over IPC. 52 // that are used to refer to them over IPC.
53 ActiveNotificationTracker manager_; 53 ActiveNotificationTracker manager_;
54 54
55 DISALLOW_COPY_AND_ASSIGN(NotificationProvider); 55 DISALLOW_COPY_AND_ASSIGN(NotificationProvider);
56 }; 56 };
57 57
58 #endif // CHROME_RENDERER_NOTIFICATION_PROVIDER_H_ 58 #endif // CHROME_RENDERER_NOTIFICATION_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698