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

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

Issue 11308223: [content shell] add support for entering/exiting fullscreen mode for layout test (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | content/shell/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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CONTENT_SHELL_SHELL_H_ 5 #ifndef CONTENT_SHELL_SHELL_H_
6 #define CONTENT_SHELL_SHELL_H_ 6 #define CONTENT_SHELL_SHELL_H_
7 7
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 static bool Register(JNIEnv* env); 97 static bool Register(JNIEnv* env);
98 #endif 98 #endif
99 99
100 // WebContentsDelegate 100 // WebContentsDelegate
101 virtual WebContents* OpenURLFromTab(WebContents* source, 101 virtual WebContents* OpenURLFromTab(WebContents* source,
102 const OpenURLParams& params) OVERRIDE; 102 const OpenURLParams& params) OVERRIDE;
103 virtual void LoadingStateChanged(WebContents* source) OVERRIDE; 103 virtual void LoadingStateChanged(WebContents* source) OVERRIDE;
104 #if defined(OS_ANDROID) 104 #if defined(OS_ANDROID)
105 virtual void LoadProgressChanged(WebContents* source, 105 virtual void LoadProgressChanged(WebContents* source,
106 double progress) OVERRIDE; 106 double progress) OVERRIDE;
107 virtual void ToggleFullscreenModeForTab(content::WebContents* web_contents, 107 #endif
108 virtual void ToggleFullscreenModeForTab(WebContents* web_contents,
108 bool enter_fullscreen) OVERRIDE; 109 bool enter_fullscreen) OVERRIDE;
109 virtual bool IsFullscreenForTabOrPending( 110 virtual bool IsFullscreenForTabOrPending(
110 const content::WebContents* web_contents) const OVERRIDE; 111 const WebContents* web_contents) const OVERRIDE;
111 #endif
112 virtual void CloseContents(WebContents* source) OVERRIDE; 112 virtual void CloseContents(WebContents* source) OVERRIDE;
113 virtual bool CanOverscrollContent() const OVERRIDE; 113 virtual bool CanOverscrollContent() const OVERRIDE;
114 virtual void WebContentsCreated(WebContents* source_contents, 114 virtual void WebContentsCreated(WebContents* source_contents,
115 int64 source_frame_id, 115 int64 source_frame_id,
116 const GURL& target_url, 116 const GURL& target_url,
117 WebContents* new_contents) OVERRIDE; 117 WebContents* new_contents) OVERRIDE;
118 virtual void DidNavigateMainFramePostCommit( 118 virtual void DidNavigateMainFramePostCommit(
119 WebContents* web_contents) OVERRIDE; 119 WebContents* web_contents) OVERRIDE;
120 virtual JavaScriptDialogCreator* GetJavaScriptDialogCreator() OVERRIDE; 120 virtual JavaScriptDialogCreator* GetJavaScriptDialogCreator() OVERRIDE;
121 #if defined(OS_MACOSX) 121 #if defined(OS_MACOSX)
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 // Resize the content area and GUI. 153 // Resize the content area and GUI.
154 void PlatformResizeSubViews(); 154 void PlatformResizeSubViews();
155 // Enable/disable a button. 155 // Enable/disable a button.
156 void PlatformEnableUIControl(UIControl control, bool is_enabled); 156 void PlatformEnableUIControl(UIControl control, bool is_enabled);
157 // Updates the url in the url bar. 157 // Updates the url in the url bar.
158 void PlatformSetAddressBarURL(const GURL& url); 158 void PlatformSetAddressBarURL(const GURL& url);
159 // Sets whether the spinner is spinning. 159 // Sets whether the spinner is spinning.
160 void PlatformSetIsLoading(bool loading); 160 void PlatformSetIsLoading(bool loading);
161 // Set the title of shell window 161 // Set the title of shell window
162 void PlatformSetTitle(const string16& title); 162 void PlatformSetTitle(const string16& title);
163 #if defined(OS_ANDROID)
164 void PlatformToggleFullscreenModeForTab(WebContents* web_contents,
165 bool enter_fullscreen);
166 bool PlatformIsFullscreenForTabOrPending(
167 const WebContents* web_contents) const;
168 #endif
163 169
164 #if (defined(OS_WIN) && !defined(USE_AURA)) || defined(TOOLKIT_GTK) 170 #if (defined(OS_WIN) && !defined(USE_AURA)) || defined(TOOLKIT_GTK)
165 // Resizes the main window to the given dimensions. 171 // Resizes the main window to the given dimensions.
166 void SizeTo(int width, int height); 172 void SizeTo(int width, int height);
167 #endif 173 #endif
168 174
169 gfx::NativeView GetContentView(); 175 gfx::NativeView GetContentView();
170 176
171 // NotificationObserver 177 // NotificationObserver
172 virtual void Observe(int type, 178 virtual void Observe(int type,
(...skipping 17 matching lines...) Expand all
190 CHROMEG_CALLBACK_3(Shell, gboolean, OnNewWindowKeyPressed, GtkAccelGroup*, 196 CHROMEG_CALLBACK_3(Shell, gboolean, OnNewWindowKeyPressed, GtkAccelGroup*,
191 GObject*, guint, GdkModifierType); 197 GObject*, guint, GdkModifierType);
192 CHROMEG_CALLBACK_3(Shell, gboolean, OnHighlightURLView, GtkAccelGroup*, 198 CHROMEG_CALLBACK_3(Shell, gboolean, OnHighlightURLView, GtkAccelGroup*,
193 GObject*, guint, GdkModifierType); 199 GObject*, guint, GdkModifierType);
194 #endif 200 #endif
195 201
196 scoped_ptr<ShellJavaScriptDialogCreator> dialog_creator_; 202 scoped_ptr<ShellJavaScriptDialogCreator> dialog_creator_;
197 203
198 scoped_ptr<WebContents> web_contents_; 204 scoped_ptr<WebContents> web_contents_;
199 205
206 bool is_fullscreen_;
207
200 gfx::NativeWindow window_; 208 gfx::NativeWindow window_;
201 gfx::NativeEditView url_edit_view_; 209 gfx::NativeEditView url_edit_view_;
202 210
203 // Notification manager 211 // Notification manager
204 NotificationRegistrar registrar_; 212 NotificationRegistrar registrar_;
205 213
206 #if defined(OS_WIN) && !defined(USE_AURA) 214 #if defined(OS_WIN) && !defined(USE_AURA)
207 WNDPROC default_edit_wnd_proc_; 215 WNDPROC default_edit_wnd_proc_;
208 static HINSTANCE instance_handle_; 216 static HINSTANCE instance_handle_;
209 #elif defined(TOOLKIT_GTK) 217 #elif defined(TOOLKIT_GTK)
(...skipping 25 matching lines...) Expand all
235 static base::Callback<void(Shell*)> shell_created_callback_; 243 static base::Callback<void(Shell*)> shell_created_callback_;
236 244
237 // True if the destructur of Shell should post a quit closure on the current 245 // True if the destructur of Shell should post a quit closure on the current
238 // message loop if the destructed Shell object was the last one. 246 // message loop if the destructed Shell object was the last one.
239 static bool quit_message_loop_; 247 static bool quit_message_loop_;
240 }; 248 };
241 249
242 } // namespace content 250 } // namespace content
243 251
244 #endif // CONTENT_SHELL_SHELL_H_ 252 #endif // CONTENT_SHELL_SHELL_H_
OLDNEW
« no previous file with comments | « no previous file | content/shell/shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698