Remove linux_chromium_gn_dbg from the chromium CQ.
[chromium-blink-merge.git] / extensions / renderer / guest_view / extensions_guest_view_container.h
blob35f2211568cee47b4bc1eb350b6ce2dc7563c830
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
3 // found in the LICENSE file.
5 #ifndef EXTENSIONS_RENDERER_GUEST_VIEW_EXTENSIONS_GUEST_VIEW_CONTAINER_H_
6 #define EXTENSIONS_RENDERER_GUEST_VIEW_EXTENSIONS_GUEST_VIEW_CONTAINER_H_
8 #include <queue>
10 #include "components/guest_view/renderer/guest_view_container.h"
11 #include "v8/include/v8.h"
13 namespace gfx {
14 class Size;
17 namespace extensions {
19 class ExtensionsGuestViewContainer : public guest_view::GuestViewContainer {
20 public:
21 explicit ExtensionsGuestViewContainer(content::RenderFrame* render_frame);
23 void RegisterElementResizeCallback(v8::Local<v8::Function> callback,
24 v8::Isolate* isolate);
26 // BrowserPluginDelegate implementation.
27 void DidResizeElement(const gfx::Size& new_size) override;
29 protected:
30 ~ExtensionsGuestViewContainer() override;
32 private:
33 void CallElementResizeCallback(const gfx::Size& new_size);
35 // GuestViewContainer implementation.
36 void OnDestroy(bool embedder_frame_destroyed) override;
38 v8::Global<v8::Function> element_resize_callback_;
39 v8::Isolate* element_resize_isolate_;
41 // Weak pointer factory used for calling the element resize callback.
42 base::WeakPtrFactory<ExtensionsGuestViewContainer> weak_ptr_factory_;
44 DISALLOW_COPY_AND_ASSIGN(ExtensionsGuestViewContainer);
47 } // namespace extensions
49 #endif // EXTENSIONS_RENDERER_GUEST_VIEW_EXTENSIONS_GUEST_VIEW_CONTAINER_H_