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

Side by Side Diff: extensions/renderer/guest_view/guest_view_container.h

Issue 765843003: Refactor GuestViewContainer::AttachRequest to allow for other request types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Avoid a new static Created 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 EXTENSIONS_RENDERER_GUEST_VIEW_GUEST_VIEW_CONTAINER_H_ 5 #ifndef EXTENSIONS_RENDERER_GUEST_VIEW_GUEST_VIEW_CONTAINER_H_
6 #define EXTENSIONS_RENDERER_GUEST_VIEW_GUEST_VIEW_CONTAINER_H_ 6 #define EXTENSIONS_RENDERER_GUEST_VIEW_GUEST_VIEW_CONTAINER_H_
7 7
8 #include "content/public/renderer/browser_plugin_delegate.h" 8 #include "content/public/renderer/browser_plugin_delegate.h"
9 #include "content/public/renderer/render_frame_observer.h" 9 #include "content/public/renderer/render_frame_observer.h"
10 #include "ipc/ipc_message.h" 10 #include "ipc/ipc_message.h"
11 11
12 namespace extensions { 12 namespace extensions {
13 13
14 class GuestViewContainer : public content::BrowserPluginDelegate, 14 class GuestViewContainer : public content::BrowserPluginDelegate,
15 public content::RenderFrameObserver { 15 public content::RenderFrameObserver {
16 public: 16 public:
17 explicit GuestViewContainer(content::RenderFrame* render_frame); 17 explicit GuestViewContainer(content::RenderFrame* render_frame);
18 ~GuestViewContainer() override; 18 ~GuestViewContainer() override;
19 19
20 // BrowserPluginDelegate implementation. 20 // BrowserPluginDelegate implementation.
21 void SetElementInstanceID(int element_instance_id) override; 21 void SetElementInstanceID(int element_instance_id) override;
22 22
23 // RenderFrameObserver override. 23 // RenderFrameObserver override.
24 void OnDestruct() override; 24 void OnDestruct() override;
25 bool OnMessageReceived(const IPC::Message& message) override; 25 bool OnMessageReceived(const IPC::Message& message) override;
26 26
27 virtual bool HandlesMessage(const IPC::Message& message) = 0; 27 virtual bool HandlesMessage(const IPC::Message& message) = 0;
28 virtual bool OnMessage(const IPC::Message& message) = 0; 28 virtual bool OnMessage(const IPC::Message& message) = 0;
29 29
30 protected:
31 int element_instance_id() const { return element_instance_id_; } 30 int element_instance_id() const { return element_instance_id_; }
32 int render_view_routing_id() const { return render_view_routing_id_; } 31 int render_view_routing_id() const { return render_view_routing_id_; }
33 32
34 private: 33 private:
35 int element_instance_id_; 34 int element_instance_id_;
36 int render_view_routing_id_; 35 int render_view_routing_id_;
37 36
38 DISALLOW_COPY_AND_ASSIGN(GuestViewContainer); 37 DISALLOW_COPY_AND_ASSIGN(GuestViewContainer);
39 }; 38 };
40 39
41 } // namespace extensions 40 } // namespace extensions
42 41
43 #endif // EXTENSIONS_RENDERER_GUEST_VIEW_GUEST_VIEW_CONTAINER_H_ 42 #endif // EXTENSIONS_RENDERER_GUEST_VIEW_GUEST_VIEW_CONTAINER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698