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

Side by Side Diff: chrome/browser/guest_view/guest_view.h

Issue 307543005: Fix the Declarative WebRequest API for <webview> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_webcontentsdelegate_impl_to_chrome
Patch Set: Addressed remainder of comments Created 6 years, 6 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
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 CHROME_BROWSER_GUEST_VIEW_GUEST_VIEW_H_ 5 #ifndef CHROME_BROWSER_GUEST_VIEW_GUEST_VIEW_H_
6 #define CHROME_BROWSER_GUEST_VIEW_GUEST_VIEW_H_ 6 #define CHROME_BROWSER_GUEST_VIEW_GUEST_VIEW_H_
7 7
8 #include "chrome/browser/guest_view/guest_view_base.h" 8 #include "chrome/browser/guest_view/guest_view_base.h"
9 9
10 // A GuestView is the templated base class for out-of-process frames in the
11 // chrome layer. GuestView is templated on its derived type to allow for type-
12 // safe access. See GuestViewBase for more information.
10 template <typename T> 13 template <typename T>
11 class GuestView : public GuestViewBase { 14 class GuestView : public GuestViewBase {
12 public: 15 public:
13 static T* From(int embedder_process_id, int guest_instance_id) { 16 static T* From(int embedder_process_id, int guest_instance_id) {
14 GuestViewBase* guest = 17 GuestViewBase* guest =
15 GuestViewBase::From(embedder_process_id, guest_instance_id); 18 GuestViewBase::From(embedder_process_id, guest_instance_id);
16 if (!guest) 19 if (!guest)
17 return NULL; 20 return NULL;
18 return guest->As<T>(); 21 return guest->As<T>();
19 } 22 }
(...skipping 25 matching lines...) Expand all
45 const std::string& embedder_extension_id) 48 const std::string& embedder_extension_id)
46 : GuestViewBase(guest_instance_id, 49 : GuestViewBase(guest_instance_id,
47 guest_web_contents, 50 guest_web_contents,
48 embedder_extension_id) {} 51 embedder_extension_id) {}
49 52
50 private: 53 private:
51 DISALLOW_COPY_AND_ASSIGN(GuestView); 54 DISALLOW_COPY_AND_ASSIGN(GuestView);
52 }; 55 };
53 56
54 #endif // CHROME_BROWSER_GUEST_VIEW_GUEST_VIEW_H_ 57 #endif // CHROME_BROWSER_GUEST_VIEW_GUEST_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698