| 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 ATHENA_CONTENT_CONTENT_PROXY_H_ | 5 #ifndef ATHENA_CONTENT_CONTENT_PROXY_H_ |
| 6 #define ATHENA_CONTENT_CONTENT_PROXY_H_ | 6 #define ATHENA_CONTENT_CONTENT_PROXY_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/ref_counted_memory.h" | 9 #include "base/memory/ref_counted_memory.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 bool CreateContentImage(); | 70 bool CreateContentImage(); |
| 71 | 71 |
| 72 // Called once the content was read back. | 72 // Called once the content was read back. |
| 73 void OnContentImageRead(bool success, const SkBitmap& bitmap); | 73 void OnContentImageRead(bool success, const SkBitmap& bitmap); |
| 74 | 74 |
| 75 // Called once the image content has been converted to PNG. | 75 // Called once the image content has been converted to PNG. |
| 76 void OnContentImageEncodeComplete(scoped_refptr<ProxyImageData> image); | 76 void OnContentImageEncodeComplete(scoped_refptr<ProxyImageData> image); |
| 77 | 77 |
| 78 // The web view which was passed on creation and is associated with this | 78 // The web view which was passed on creation and is associated with this |
| 79 // object. It will be shown when OnPreContentDestroyed() gets called and then | 79 // object. It will be shown when OnPreContentDestroyed() gets called and then |
| 80 // set to NULL. The ownership remains with the creator. | 80 // set to nullptr. The ownership remains with the creator. |
| 81 views::WebView* web_view_; | 81 views::WebView* web_view_; |
| 82 | 82 |
| 83 // While we are doing our PNG encode, we keep the read back image to have | 83 // While we are doing our PNG encode, we keep the read back image to have |
| 84 // something which we can pass back to the overview mode. (It would make no | 84 // something which we can pass back to the overview mode. (It would make no |
| 85 // sense to the user to see that more recent windows get painted later than | 85 // sense to the user to see that more recent windows get painted later than |
| 86 // older ones). | 86 // older ones). |
| 87 gfx::ImageSkia raw_image_; | 87 gfx::ImageSkia raw_image_; |
| 88 | 88 |
| 89 // True if the content is visible. | 89 // True if the content is visible. |
| 90 bool content_visible_; | 90 bool content_visible_; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 104 // weakptr for the callback to make sure that the read back / encoding image | 104 // weakptr for the callback to make sure that the read back / encoding image |
| 105 // completion callback does not trigger on a destroyed ContentProxy. | 105 // completion callback does not trigger on a destroyed ContentProxy. |
| 106 base::WeakPtrFactory<ContentProxy> proxy_content_to_image_factory_; | 106 base::WeakPtrFactory<ContentProxy> proxy_content_to_image_factory_; |
| 107 | 107 |
| 108 DISALLOW_COPY_AND_ASSIGN(ContentProxy); | 108 DISALLOW_COPY_AND_ASSIGN(ContentProxy); |
| 109 }; | 109 }; |
| 110 | 110 |
| 111 } // namespace athena | 111 } // namespace athena |
| 112 | 112 |
| 113 #endif // ATHENA_CONTENT_CONTENT_PROXY_H_ | 113 #endif // ATHENA_CONTENT_CONTENT_PROXY_H_ |
| OLD | NEW |