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

Side by Side Diff: extensions/browser/guest_view/web_view/web_view_guest.h

Issue 916363003: Enable pinch-zoom on the new login page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase for enum conflict. Created 5 years, 10 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_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 <vector> 8 #include <vector>
9 9
10 #include "base/observer_list.h" 10 #include "base/observer_list.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 void ShowContextMenu( 72 void ShowContextMenu(
73 int request_id, 73 int request_id,
74 const WebViewGuestDelegate::MenuItemVector* items); 74 const WebViewGuestDelegate::MenuItemVector* items);
75 75
76 // Sets the frame name of the guest. 76 // Sets the frame name of the guest.
77 void SetName(const std::string& name); 77 void SetName(const std::string& name);
78 78
79 // Set the zoom factor. 79 // Set the zoom factor.
80 void SetZoom(double zoom_factor); 80 void SetZoom(double zoom_factor);
81 81
82 void SetAllowScaling(bool allow);
83
82 // Sets the transparency of the guest. 84 // Sets the transparency of the guest.
83 void SetAllowTransparency(bool allow); 85 void SetAllowTransparency(bool allow);
84 86
85 // Loads a data URL with a specified base URL and virtual URL. 87 // Loads a data URL with a specified base URL and virtual URL.
86 bool LoadDataWithBaseURL(const std::string& data_url, 88 bool LoadDataWithBaseURL(const std::string& data_url,
87 const std::string& base_url, 89 const std::string& base_url,
88 const std::string& virtual_url, 90 const std::string& virtual_url,
89 std::string* error); 91 std::string* error);
90 92
91 // GuestViewBase implementation. 93 // GuestViewBase implementation.
(...skipping 27 matching lines...) Expand all
119 void FindReply(content::WebContents* source, 121 void FindReply(content::WebContents* source,
120 int request_id, 122 int request_id,
121 int number_of_matches, 123 int number_of_matches,
122 const gfx::Rect& selection_rect, 124 const gfx::Rect& selection_rect,
123 int active_match_ordinal, 125 int active_match_ordinal,
124 bool final_update) override; 126 bool final_update) override;
125 bool HandleContextMenu(const content::ContextMenuParams& params) override; 127 bool HandleContextMenu(const content::ContextMenuParams& params) override;
126 void HandleKeyboardEvent( 128 void HandleKeyboardEvent(
127 content::WebContents* source, 129 content::WebContents* source,
128 const content::NativeWebKeyboardEvent& event) override; 130 const content::NativeWebKeyboardEvent& event) override;
131 bool PreHandleGestureEvent(content::WebContents* source,
132 const blink::WebGestureEvent& event) override;
129 void RendererResponsive(content::WebContents* source) override; 133 void RendererResponsive(content::WebContents* source) override;
130 void RendererUnresponsive(content::WebContents* source) override; 134 void RendererUnresponsive(content::WebContents* source) override;
131 void RequestMediaAccessPermission( 135 void RequestMediaAccessPermission(
132 content::WebContents* source, 136 content::WebContents* source,
133 const content::MediaStreamRequest& request, 137 const content::MediaStreamRequest& request,
134 const content::MediaResponseCallback& callback) override; 138 const content::MediaResponseCallback& callback) override;
135 void RequestPointerLockPermission( 139 void RequestPointerLockPermission(
136 bool user_gesture, 140 bool user_gesture,
137 bool last_unlocked_by_target, 141 bool last_unlocked_by_target,
138 const base::Callback<void(bool)>& callback) override; 142 const base::Callback<void(bool)>& callback) override;
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 name(name), 359 name(name),
356 changed(false) {} 360 changed(false) {}
357 }; 361 };
358 362
359 using PendingWindowMap = std::map<WebViewGuest*, NewWindowInfo>; 363 using PendingWindowMap = std::map<WebViewGuest*, NewWindowInfo>;
360 PendingWindowMap pending_new_windows_; 364 PendingWindowMap pending_new_windows_;
361 365
362 // Stores the current zoom factor. 366 // Stores the current zoom factor.
363 double current_zoom_factor_; 367 double current_zoom_factor_;
364 368
369 // Determines if this guest accepts pinch-zoom gestures.
370 bool allow_scaling_;
371
365 // This is used to ensure pending tasks will not fire after this object is 372 // This is used to ensure pending tasks will not fire after this object is
366 // destroyed. 373 // destroyed.
367 base::WeakPtrFactory<WebViewGuest> weak_ptr_factory_; 374 base::WeakPtrFactory<WebViewGuest> weak_ptr_factory_;
368 375
369 DISALLOW_COPY_AND_ASSIGN(WebViewGuest); 376 DISALLOW_COPY_AND_ASSIGN(WebViewGuest);
370 }; 377 };
371 378
372 } // namespace extensions 379 } // namespace extensions
373 380
374 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ 381 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_
OLDNEW
« no previous file with comments | « extensions/browser/guest_view/web_view/web_view_constants.cc ('k') | extensions/browser/guest_view/web_view/web_view_guest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698