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

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

Issue 295083002: BrowserPluginGuest is no longer a WebContentsDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@make_context_menu_easier_to_refactor
Patch Set: Fixed content_browsertests Created 6 years, 7 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 CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ 5 #ifndef CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_
6 #define CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ 6 #define CHROME_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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 void SetName(const std::string& name); 67 void SetName(const std::string& name);
68 68
69 // GuestViewBase implementation. 69 // GuestViewBase implementation.
70 virtual void Attach(content::WebContents* embedder_web_contents, 70 virtual void Attach(content::WebContents* embedder_web_contents,
71 const base::DictionaryValue& args) OVERRIDE; 71 const base::DictionaryValue& args) OVERRIDE;
72 72
73 // BrowserPluginGuestDelegate public implementation. 73 // BrowserPluginGuestDelegate public implementation.
74 virtual bool HandleContextMenu( 74 virtual bool HandleContextMenu(
75 const content::ContextMenuParams& params) OVERRIDE; 75 const content::ContextMenuParams& params) OVERRIDE;
76 76
77 // GuestDelegate implementation. 77 // WebContentsDelegate implementation.
78 virtual void AddMessageToConsole(int32 level, 78 virtual bool AddMessageToConsole(content::WebContents* source,
79 int32 level,
79 const base::string16& message, 80 const base::string16& message,
80 int32 line_no, 81 int32 line_no,
81 const base::string16& source_id) OVERRIDE; 82 const base::string16& source_id) OVERRIDE;
82 virtual void LoadProgressed(double progress) OVERRIDE; 83 virtual void LoadProgressChanged(content::WebContents* source,
83 virtual void Close() OVERRIDE; 84 double progress) OVERRIDE;
84 virtual void DidAttach() OVERRIDE; 85 virtual void CloseContents(content::WebContents* source) OVERRIDE;
85 virtual void EmbedderDestroyed() OVERRIDE; 86 virtual void FindReply(content::WebContents* source,
86 virtual void FindReply(int request_id, 87 int request_id,
87 int number_of_matches, 88 int number_of_matches,
88 const gfx::Rect& selection_rect, 89 const gfx::Rect& selection_rect,
89 int active_match_ordinal, 90 int active_match_ordinal,
90 bool final_update) OVERRIDE; 91 bool final_update) OVERRIDE;
91 virtual void GuestProcessGone(base::TerminationStatus status) OVERRIDE;
92 virtual void HandleKeyboardEvent( 92 virtual void HandleKeyboardEvent(
93 content::WebContents* source,
93 const content::NativeWebKeyboardEvent& event) OVERRIDE; 94 const content::NativeWebKeyboardEvent& event) OVERRIDE;
94 virtual bool IsDragAndDropEnabled() OVERRIDE; 95 virtual void RendererResponsive(content::WebContents* source) OVERRIDE;
95 virtual void RendererResponsive() OVERRIDE; 96 virtual void RendererUnresponsive(content::WebContents* source) OVERRIDE;
96 virtual void RendererUnresponsive() OVERRIDE;
97 virtual void SizeChanged(const gfx::Size& old_size, const gfx::Size& new_size)
98 OVERRIDE;
99 virtual void RequestMediaAccessPermission( 97 virtual void RequestMediaAccessPermission(
98 content::WebContents* source,
100 const content::MediaStreamRequest& request, 99 const content::MediaStreamRequest& request,
101 const content::MediaResponseCallback& callback) OVERRIDE; 100 const content::MediaResponseCallback& callback) OVERRIDE;
102 virtual void CanDownload(const std::string& request_method, 101 virtual void CanDownload(content::RenderViewHost* render_view_host,
103 const GURL& url, 102 const GURL& url,
103 const std::string& request_method,
104 const base::Callback<void(bool)>& callback) OVERRIDE; 104 const base::Callback<void(bool)>& callback) OVERRIDE;
105 virtual void RequestPointerLockPermission(
106 bool user_gesture,
107 bool last_unlocked_by_target,
108 const base::Callback<void(bool)>& callback) OVERRIDE;
109 virtual content::JavaScriptDialogManager* 105 virtual content::JavaScriptDialogManager*
110 GetJavaScriptDialogManager() OVERRIDE; 106 GetJavaScriptDialogManager() OVERRIDE;
111 virtual content::ColorChooser* OpenColorChooser( 107 virtual content::ColorChooser* OpenColorChooser(
112 content::WebContents* web_contents, 108 content::WebContents* web_contents,
113 SkColor color, 109 SkColor color,
114 const std::vector<content::ColorSuggestion>& suggestions) OVERRIDE; 110 const std::vector<content::ColorSuggestion>& suggestions) OVERRIDE;
115 virtual void RunFileChooser( 111 virtual void RunFileChooser(
116 content::WebContents* web_contents, 112 content::WebContents* web_contents,
117 const content::FileChooserParams& params) OVERRIDE; 113 const content::FileChooserParams& params) OVERRIDE;
118 virtual void NavigateGuest(const std::string& src) OVERRIDE;
119 virtual void Destroy() OVERRIDE;
120 virtual void AddNewContents(content::WebContents* source, 114 virtual void AddNewContents(content::WebContents* source,
121 content::WebContents* new_contents, 115 content::WebContents* new_contents,
122 WindowOpenDisposition disposition, 116 WindowOpenDisposition disposition,
123 const gfx::Rect& initial_pos, 117 const gfx::Rect& initial_pos,
124 bool user_gesture, 118 bool user_gesture,
125 bool* was_blocked) OVERRIDE; 119 bool* was_blocked) OVERRIDE;
126 virtual content::WebContents* OpenURLFromTab( 120 virtual content::WebContents* OpenURLFromTab(
127 content::WebContents* source, 121 content::WebContents* source,
128 const content::OpenURLParams& params) OVERRIDE; 122 const content::OpenURLParams& params) OVERRIDE;
129 virtual void WebContentsCreated(content::WebContents* source_contents, 123 virtual void WebContentsCreated(content::WebContents* source_contents,
130 int opener_render_frame_id, 124 int opener_render_frame_id,
131 const base::string16& frame_name, 125 const base::string16& frame_name,
132 const GURL& target_url, 126 const GURL& target_url,
133 content::WebContents* new_contents) OVERRIDE; 127 content::WebContents* new_contents) OVERRIDE;
134 128
129 // GuestDelegate implementation.
130 virtual void DidAttach() OVERRIDE;
131 virtual void EmbedderDestroyed() OVERRIDE;
132 virtual void GuestProcessGone(base::TerminationStatus status) OVERRIDE;
133 virtual bool IsDragAndDropEnabled() OVERRIDE;
134 virtual void SizeChanged(const gfx::Size& old_size, const gfx::Size& new_size)
135 OVERRIDE;
136 virtual void RequestPointerLockPermission(
137 bool user_gesture,
138 bool last_unlocked_by_target,
139 const base::Callback<void(bool)>& callback) OVERRIDE;
140 virtual void NavigateGuest(const std::string& src) OVERRIDE;
141 virtual void Destroy() OVERRIDE;
142
135 // NotificationObserver implementation. 143 // NotificationObserver implementation.
136 virtual void Observe(int type, 144 virtual void Observe(int type,
137 const content::NotificationSource& source, 145 const content::NotificationSource& source,
138 const content::NotificationDetails& details) OVERRIDE; 146 const content::NotificationDetails& details) OVERRIDE;
139 147
140 // Set the zoom factor. 148 // Set the zoom factor.
141 virtual void SetZoom(double zoom_factor) OVERRIDE; 149 virtual void SetZoom(double zoom_factor) OVERRIDE;
142 150
143 // Returns the current zoom factor. 151 // Returns the current zoom factor.
144 double GetZoom(); 152 double GetZoom();
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 name(name) {} 435 name(name) {}
428 }; 436 };
429 437
430 typedef std::map<WebViewGuest*, NewWindowInfo> PendingWindowMap; 438 typedef std::map<WebViewGuest*, NewWindowInfo> PendingWindowMap;
431 PendingWindowMap pending_new_windows_; 439 PendingWindowMap pending_new_windows_;
432 440
433 DISALLOW_COPY_AND_ASSIGN(WebViewGuest); 441 DISALLOW_COPY_AND_ASSIGN(WebViewGuest);
434 }; 442 };
435 443
436 #endif // CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ 444 #endif // CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698