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

Side by Side Diff: content/shell/browser/shell.h

Issue 2132983002: Move content shell context menu to ShellWebContentsViewDelegate in Views (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed cast_shell_linux compile error Created 4 years, 5 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
« no previous file with comments | « content/shell/BUILD.gn ('k') | content/shell/browser/shell.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef CONTENT_SHELL_BROWSER_SHELL_H_ 4 #ifndef CONTENT_SHELL_BROWSER_SHELL_H_
5 #define CONTENT_SHELL_BROWSER_SHELL_H_ 5 #define CONTENT_SHELL_BROWSER_SHELL_H_
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <vector> 10 #include <vector>
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 const std::string& data, 69 const std::string& data,
70 const GURL& base_url); 70 const GURL& base_url);
71 #endif 71 #endif
72 void GoBackOrForward(int offset); 72 void GoBackOrForward(int offset);
73 void Reload(); 73 void Reload();
74 void ReloadBypassingCache(); 74 void ReloadBypassingCache();
75 void Stop(); 75 void Stop();
76 void UpdateNavigationControls(bool to_different_document); 76 void UpdateNavigationControls(bool to_different_document);
77 void Close(); 77 void Close();
78 void ShowDevTools(); 78 void ShowDevTools();
79 void ShowDevToolsForElementAt(int x, int y);
80 void CloseDevTools(); 79 void CloseDevTools();
81 #if defined(OS_MACOSX) 80 #if defined(OS_MACOSX)
82 // Resizes the web content view to the given dimensions. 81 // Resizes the web content view to the given dimensions.
83 void SizeTo(const gfx::Size& content_size); 82 void SizeTo(const gfx::Size& content_size);
84 #endif 83 #endif
85 84
86 // Do one time initialization at application startup. 85 // Do one time initialization at application startup.
87 static void Initialize(); 86 static void Initialize();
88 87
89 static Shell* CreateNewWindow(BrowserContext* browser_context, 88 static Shell* CreateNewWindow(BrowserContext* browser_context,
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 void HandleKeyboardEvent(WebContents* source, 151 void HandleKeyboardEvent(WebContents* source,
153 const NativeWebKeyboardEvent& event) override; 152 const NativeWebKeyboardEvent& event) override;
154 #endif 153 #endif
155 bool AddMessageToConsole(WebContents* source, 154 bool AddMessageToConsole(WebContents* source,
156 int32_t level, 155 int32_t level,
157 const base::string16& message, 156 const base::string16& message,
158 int32_t line_no, 157 int32_t line_no,
159 const base::string16& source_id) override; 158 const base::string16& source_id) override;
160 void RendererUnresponsive(WebContents* source) override; 159 void RendererUnresponsive(WebContents* source) override;
161 void ActivateContents(WebContents* contents) override; 160 void ActivateContents(WebContents* contents) override;
162 bool HandleContextMenu(const content::ContextMenuParams& params) override;
163 161
164 static gfx::Size GetShellDefaultSize(); 162 static gfx::Size GetShellDefaultSize();
165 163
166 private: 164 private:
167 enum UIControl { 165 enum UIControl {
168 BACK_BUTTON, 166 BACK_BUTTON,
169 FORWARD_BUTTON, 167 FORWARD_BUTTON,
170 STOP_BUTTON 168 STOP_BUTTON
171 }; 169 };
172 170
(...skipping 25 matching lines...) Expand all
198 // Resize the content area and GUI. 196 // Resize the content area and GUI.
199 void PlatformResizeSubViews(); 197 void PlatformResizeSubViews();
200 // Enable/disable a button. 198 // Enable/disable a button.
201 void PlatformEnableUIControl(UIControl control, bool is_enabled); 199 void PlatformEnableUIControl(UIControl control, bool is_enabled);
202 // Updates the url in the url bar. 200 // Updates the url in the url bar.
203 void PlatformSetAddressBarURL(const GURL& url); 201 void PlatformSetAddressBarURL(const GURL& url);
204 // Sets whether the spinner is spinning. 202 // Sets whether the spinner is spinning.
205 void PlatformSetIsLoading(bool loading); 203 void PlatformSetIsLoading(bool loading);
206 // Set the title of shell window 204 // Set the title of shell window
207 void PlatformSetTitle(const base::string16& title); 205 void PlatformSetTitle(const base::string16& title);
208 // User right-clicked on the web view
209 bool PlatformHandleContextMenu(const content::ContextMenuParams& params);
210 #if defined(OS_ANDROID) 206 #if defined(OS_ANDROID)
211 void PlatformToggleFullscreenModeForTab(WebContents* web_contents, 207 void PlatformToggleFullscreenModeForTab(WebContents* web_contents,
212 bool enter_fullscreen); 208 bool enter_fullscreen);
213 bool PlatformIsFullscreenForTabOrPending( 209 bool PlatformIsFullscreenForTabOrPending(
214 const WebContents* web_contents) const; 210 const WebContents* web_contents) const;
215 #endif 211 #endif
216 212
217 // Helper method for the two public LoadData methods. 213 // Helper method for the two public LoadData methods.
218 void LoadDataWithBaseURLInternal(const GURL& url, 214 void LoadDataWithBaseURLInternal(const GURL& url,
219 const std::string& data, 215 const std::string& data,
220 const GURL& base_url, 216 const GURL& base_url,
221 bool load_as_string); 217 bool load_as_string);
222 218
223 gfx::NativeView GetContentView(); 219 gfx::NativeView GetContentView();
224 220
225 void ToggleFullscreenModeForTab(WebContents* web_contents, 221 void ToggleFullscreenModeForTab(WebContents* web_contents,
226 bool enter_fullscreen); 222 bool enter_fullscreen);
227 // WebContentsObserver 223 // WebContentsObserver
228 void TitleWasSet(NavigationEntry* entry, bool explicit_set) override; 224 void TitleWasSet(NavigationEntry* entry, bool explicit_set) override;
229 225
230 void InnerShowDevTools();
231 void OnDevToolsWebContentsDestroyed(); 226 void OnDevToolsWebContentsDestroyed();
232 227
233 std::unique_ptr<ShellJavaScriptDialogManager> dialog_manager_; 228 std::unique_ptr<ShellJavaScriptDialogManager> dialog_manager_;
234 229
235 std::unique_ptr<WebContents> web_contents_; 230 std::unique_ptr<WebContents> web_contents_;
236 231
237 std::unique_ptr<DevToolsWebContentsObserver> devtools_observer_; 232 std::unique_ptr<DevToolsWebContentsObserver> devtools_observer_;
238 ShellDevToolsFrontend* devtools_frontend_; 233 ShellDevToolsFrontend* devtools_frontend_;
239 234
240 bool is_fullscreen_; 235 bool is_fullscreen_;
(...skipping 29 matching lines...) Expand all
270 static base::Callback<void(Shell*)> shell_created_callback_; 265 static base::Callback<void(Shell*)> shell_created_callback_;
271 266
272 // True if the destructur of Shell should post a quit closure on the current 267 // True if the destructur of Shell should post a quit closure on the current
273 // message loop if the destructed Shell object was the last one. 268 // message loop if the destructed Shell object was the last one.
274 static bool quit_message_loop_; 269 static bool quit_message_loop_;
275 }; 270 };
276 271
277 } // namespace content 272 } // namespace content
278 273
279 #endif // CONTENT_SHELL_BROWSER_SHELL_H_ 274 #endif // CONTENT_SHELL_BROWSER_SHELL_H_
OLDNEW
« no previous file with comments | « content/shell/BUILD.gn ('k') | content/shell/browser/shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698