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

Side by Side Diff: extensions/browser/guest_view/guest_view_base.h

Issue 497843002: GuestViews should be able to specify task manager entries (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added DEPS Created 6 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
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_BROWSER_GUEST_VIEW_GUEST_VIEW_BASE_H_ 5 #ifndef EXTENSIONS_BROWSER_GUEST_VIEW_GUEST_VIEW_BASE_H_
6 #define EXTENSIONS_BROWSER_GUEST_VIEW_GUEST_VIEW_BASE_H_ 6 #define EXTENSIONS_BROWSER_GUEST_VIEW_GUEST_VIEW_BASE_H_
7 7
8 #include <queue> 8 #include <queue>
9 9
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 // This gives the derived class an opportunity to perform some cleanup prior 138 // This gives the derived class an opportunity to perform some cleanup prior
139 // to destruction. 139 // to destruction.
140 virtual void WillDestroy() {} 140 virtual void WillDestroy() {}
141 141
142 // This method is to be implemented by the derived class. Access to guest 142 // This method is to be implemented by the derived class. Access to guest
143 // views are determined by the availability of the internal extension API 143 // views are determined by the availability of the internal extension API
144 // used to implement the guest view. 144 // used to implement the guest view.
145 // 145 //
146 // This should be the name of the API as it appears in the _api_features.json 146 // This should be the name of the API as it appears in the _api_features.json
147 // file. 147 // file.
148 virtual const char* GetAPINamespace() = 0; 148 virtual const char* GetAPINamespace() const = 0;
149
150 // This method is to be implemented by the derived class. This method is the
151 // task prefix to show for a task produced by this GuestViewBase's derived
152 // type.
153 virtual int GetTaskPrefix() const = 0;
149 154
150 // This method is to be implemented by the derived class. Given a set of 155 // This method is to be implemented by the derived class. Given a set of
151 // initialization parameters, a concrete subclass of GuestViewBase can 156 // initialization parameters, a concrete subclass of GuestViewBase can
152 // create a specialized WebContents that it returns back to GuestViewBase. 157 // create a specialized WebContents that it returns back to GuestViewBase.
153 typedef base::Callback<void(content::WebContents*)> 158 typedef base::Callback<void(content::WebContents*)>
154 WebContentsCreatedCallback; 159 WebContentsCreatedCallback;
155 virtual void CreateWebContents( 160 virtual void CreateWebContents(
156 const std::string& embedder_extension_id, 161 const std::string& embedder_extension_id,
157 int embedder_render_process_id, 162 int embedder_render_process_id,
158 const base::DictionaryValue& create_params, 163 const base::DictionaryValue& create_params,
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 // This is used to ensure pending tasks will not fire after this object is 332 // This is used to ensure pending tasks will not fire after this object is
328 // destroyed. 333 // destroyed.
329 base::WeakPtrFactory<GuestViewBase> weak_ptr_factory_; 334 base::WeakPtrFactory<GuestViewBase> weak_ptr_factory_;
330 335
331 DISALLOW_COPY_AND_ASSIGN(GuestViewBase); 336 DISALLOW_COPY_AND_ASSIGN(GuestViewBase);
332 }; 337 };
333 338
334 } // namespace extensions 339 } // namespace extensions
335 340
336 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_GUEST_VIEW_BASE_H_ 341 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_GUEST_VIEW_BASE_H_
OLDNEW
« no previous file with comments | « extensions/browser/guest_view/app_view/app_view_guest.cc ('k') | extensions/browser/guest_view/web_view/web_view_guest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698