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_WEB_VIEW_WEB_VIEW_GUEST_H_ | 5 #ifndef EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ |
6 #define EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ | 6 #define EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 void DidAttachToEmbedder() final; | 174 void DidAttachToEmbedder() final; |
175 void DidDropLink(const GURL& url) final; | 175 void DidDropLink(const GURL& url) final; |
176 void DidInitialize(const base::DictionaryValue& create_params) final; | 176 void DidInitialize(const base::DictionaryValue& create_params) final; |
177 void EmbedderFullscreenToggled(bool entered_fullscreen) final; | 177 void EmbedderFullscreenToggled(bool entered_fullscreen) final; |
178 void FindReply(content::WebContents* source, | 178 void FindReply(content::WebContents* source, |
179 int request_id, | 179 int request_id, |
180 int number_of_matches, | 180 int number_of_matches, |
181 const gfx::Rect& selection_rect, | 181 const gfx::Rect& selection_rect, |
182 int active_match_ordinal, | 182 int active_match_ordinal, |
183 bool final_update) final; | 183 bool final_update) final; |
| 184 bool ZoomPropagatesFromEmbedderToGuest() const final; |
184 const char* GetAPINamespace() const final; | 185 const char* GetAPINamespace() const final; |
185 int GetTaskPrefix() const final; | 186 int GetTaskPrefix() const final; |
186 void GuestDestroyed() final; | 187 void GuestDestroyed() final; |
187 void GuestReady() final; | 188 void GuestReady() final; |
188 void GuestSizeChangedDueToAutoSize(const gfx::Size& old_size, | 189 void GuestSizeChangedDueToAutoSize(const gfx::Size& old_size, |
189 const gfx::Size& new_size) final; | 190 const gfx::Size& new_size) final; |
190 void GuestViewDidStopLoading() final; | 191 void GuestViewDidStopLoading() final; |
191 void GuestZoomChanged(double old_zoom_level, double new_zoom_level) final; | 192 void GuestZoomChanged(double old_zoom_level, double new_zoom_level) final; |
192 bool IsAutoSizeSupported() const final; | 193 bool IsAutoSizeSupported() const final; |
193 void SetContextMenuPosition(const gfx::Point& position) final; | 194 void SetContextMenuPosition(const gfx::Point& position) final; |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 // Determines if this guest accepts pinch-zoom gestures. | 371 // Determines if this guest accepts pinch-zoom gestures. |
371 bool allow_scaling_; | 372 bool allow_scaling_; |
372 bool is_guest_fullscreen_; | 373 bool is_guest_fullscreen_; |
373 bool is_embedder_fullscreen_; | 374 bool is_embedder_fullscreen_; |
374 bool last_fullscreen_permission_was_allowed_by_embedder_; | 375 bool last_fullscreen_permission_was_allowed_by_embedder_; |
375 | 376 |
376 // Tracks whether the webview has a pending zoom from before the first | 377 // Tracks whether the webview has a pending zoom from before the first |
377 // navigation. This will be equal to 0 when there is no pending zoom. | 378 // navigation. This will be equal to 0 when there is no pending zoom. |
378 double pending_zoom_factor_; | 379 double pending_zoom_factor_; |
379 | 380 |
| 381 // Whether the GuestView set an explicit zoom level. |
| 382 bool did_set_explicit_zoom_; |
| 383 |
380 // This is used to ensure pending tasks will not fire after this object is | 384 // This is used to ensure pending tasks will not fire after this object is |
381 // destroyed. | 385 // destroyed. |
382 base::WeakPtrFactory<WebViewGuest> weak_ptr_factory_; | 386 base::WeakPtrFactory<WebViewGuest> weak_ptr_factory_; |
383 | 387 |
384 DISALLOW_COPY_AND_ASSIGN(WebViewGuest); | 388 DISALLOW_COPY_AND_ASSIGN(WebViewGuest); |
385 }; | 389 }; |
386 | 390 |
387 } // namespace extensions | 391 } // namespace extensions |
388 | 392 |
389 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ | 393 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ |
OLD | NEW |