| OLD | NEW |
| 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 virtual void DidAttachToEmbedder() {} | 96 virtual void DidAttachToEmbedder() {} |
| 97 | 97 |
| 98 // This method is called after this GuestViewBase has been initiated. | 98 // This method is called after this GuestViewBase has been initiated. |
| 99 // | 99 // |
| 100 // This gives the derived class an opportunity to perform additional | 100 // This gives the derived class an opportunity to perform additional |
| 101 // initialization. | 101 // initialization. |
| 102 virtual void DidInitialize(const base::DictionaryValue& create_params) {} | 102 virtual void DidInitialize(const base::DictionaryValue& create_params) {} |
| 103 | 103 |
| 104 // This method is called when the initial set of frames within the page have | 104 // This method is called when the initial set of frames within the page have |
| 105 // completed loading. | 105 // completed loading. |
| 106 virtual void DidStopLoading() {} | 106 virtual void GuestViewDidStopLoading() {} |
| 107 | 107 |
| 108 // This method is called before the embedder is destroyed. | 108 // This method is called before the embedder is destroyed. |
| 109 // |owner_web_contents_| should still be valid during this call. This | 109 // |owner_web_contents_| should still be valid during this call. This |
| 110 // allows the derived class to perform some cleanup related to the embedder | 110 // allows the derived class to perform some cleanup related to the embedder |
| 111 // web contents. | 111 // web contents. |
| 112 virtual void EmbedderWillBeDestroyed() {} | 112 virtual void EmbedderWillBeDestroyed() {} |
| 113 | 113 |
| 114 // This method is called when the guest WebContents has been destroyed. This | 114 // This method is called when the guest WebContents has been destroyed. This |
| 115 // object will be destroyed after this call returns. | 115 // object will be destroyed after this call returns. |
| 116 // | 116 // |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 int LogicalPixelsToPhysicalPixels(double logical_pixels); | 310 int LogicalPixelsToPhysicalPixels(double logical_pixels); |
| 311 | 311 |
| 312 // Convert sizes in pixels from physical to logical numbers of pixels. | 312 // Convert sizes in pixels from physical to logical numbers of pixels. |
| 313 // Note that a size can consist of a fractional number of logical pixels | 313 // Note that a size can consist of a fractional number of logical pixels |
| 314 // (hence the return value is represented as a double), but will always | 314 // (hence the return value is represented as a double), but will always |
| 315 // consist of an integral number of physical pixels (hence |physical_pixels| | 315 // consist of an integral number of physical pixels (hence |physical_pixels| |
| 316 // is represented as an int). | 316 // is represented as an int). |
| 317 double PhysicalPixelsToLogicalPixels(int physical_pixels); | 317 double PhysicalPixelsToLogicalPixels(int physical_pixels); |
| 318 | 318 |
| 319 // WebContentsObserver implementation. | 319 // WebContentsObserver implementation. |
| 320 void DidStopLoading(content::RenderViewHost* render_view_host) final; | 320 void DidStopLoading() final; |
| 321 void RenderViewReady() final; | 321 void RenderViewReady() final; |
| 322 void WebContentsDestroyed() final; | 322 void WebContentsDestroyed() final; |
| 323 | 323 |
| 324 // WebContentsDelegate implementation. | 324 // WebContentsDelegate implementation. |
| 325 void ActivateContents(content::WebContents* contents) final; | 325 void ActivateContents(content::WebContents* contents) final; |
| 326 void DeactivateContents(content::WebContents* contents) final; | 326 void DeactivateContents(content::WebContents* contents) final; |
| 327 void ContentsMouseEvent(content::WebContents* source, | 327 void ContentsMouseEvent(content::WebContents* source, |
| 328 const gfx::Point& location, | 328 const gfx::Point& location, |
| 329 bool motion) override; | 329 bool motion) override; |
| 330 void ContentsZoomChange(bool zoom_in) override; | 330 void ContentsZoomChange(bool zoom_in) override; |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 448 // This is used to ensure pending tasks will not fire after this object is | 448 // This is used to ensure pending tasks will not fire after this object is |
| 449 // destroyed. | 449 // destroyed. |
| 450 base::WeakPtrFactory<GuestViewBase> weak_ptr_factory_; | 450 base::WeakPtrFactory<GuestViewBase> weak_ptr_factory_; |
| 451 | 451 |
| 452 DISALLOW_COPY_AND_ASSIGN(GuestViewBase); | 452 DISALLOW_COPY_AND_ASSIGN(GuestViewBase); |
| 453 }; | 453 }; |
| 454 | 454 |
| 455 } // namespace extensions | 455 } // namespace extensions |
| 456 | 456 |
| 457 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_GUEST_VIEW_BASE_H_ | 457 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_GUEST_VIEW_BASE_H_ |
| OLD | NEW |