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

Side by Side Diff: trunk/src/apps/shell_window.h

Issue 22356002: Revert 215745 "Fix crash when reloading packaged app. " (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | trunk/src/apps/shell_window.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 4
5 #ifndef APPS_SHELL_WINDOW_H_ 5 #ifndef APPS_SHELL_WINDOW_H_
6 #define APPS_SHELL_WINDOW_H_ 6 #define APPS_SHELL_WINDOW_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "chrome/browser/extensions/extension_icon_image.h" 10 #include "chrome/browser/extensions/extension_icon_image.h"
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 ShellWindow(Profile* profile, 174 ShellWindow(Profile* profile,
175 Delegate* delegate, 175 Delegate* delegate,
176 const extensions::Extension* extension); 176 const extensions::Extension* extension);
177 177
178 // Initializes the render interface, web contents, and native window. 178 // Initializes the render interface, web contents, and native window.
179 // |shell_window_contents| will become owned by ShellWindow. 179 // |shell_window_contents| will become owned by ShellWindow.
180 void Init(const GURL& url, 180 void Init(const GURL& url,
181 ShellWindowContents* shell_window_contents, 181 ShellWindowContents* shell_window_contents,
182 const CreateParams& params); 182 const CreateParams& params);
183 183
184
184 const std::string& window_key() const { return window_key_; } 185 const std::string& window_key() const { return window_key_; }
185 const SessionID& session_id() const { return session_id_; } 186 const SessionID& session_id() const { return session_id_; }
186 const extensions::Extension* extension() const { return extension_; } 187 const extensions::Extension* extension() const { return extension_; }
187 const std::string& extension_id() const { return extension_id_; } 188 const std::string& extension_id() const { return extension_id_; }
188 content::WebContents* web_contents() const; 189 content::WebContents* web_contents() const;
189 WindowType window_type() const { return window_type_; } 190 WindowType window_type() const { return window_type_; }
190 bool window_type_is_panel() const { 191 bool window_type_is_panel() const {
191 return (window_type_ == WINDOW_TYPE_PANEL || 192 return (window_type_ == WINDOW_TYPE_PANEL ||
192 window_type_ == WINDOW_TYPE_V1_PANEL); 193 window_type_ == WINDOW_TYPE_V1_PANEL);
193 } 194 }
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 virtual void Observe(int type, 292 virtual void Observe(int type,
292 const content::NotificationSource& source, 293 const content::NotificationSource& source,
293 const content::NotificationDetails& details) OVERRIDE; 294 const content::NotificationDetails& details) OVERRIDE;
294 295
295 // web_modal::WebContentsModalDialogManagerDelegate implementation. 296 // web_modal::WebContentsModalDialogManagerDelegate implementation.
296 virtual void SetWebContentsBlocked(content::WebContents* web_contents, 297 virtual void SetWebContentsBlocked(content::WebContents* web_contents,
297 bool blocked) OVERRIDE; 298 bool blocked) OVERRIDE;
298 virtual bool IsWebContentsVisible( 299 virtual bool IsWebContentsVisible(
299 content::WebContents* web_contents) OVERRIDE; 300 content::WebContents* web_contents) OVERRIDE;
300 301
301 // Remove the window from the ShellWindowRegistry and tell the native
302 // window to close. The native window won't be actually closed until
303 // OnNativeClose().
304 void Close();
305
306 // Helper method to add a message to the renderer's DevTools console. 302 // Helper method to add a message to the renderer's DevTools console.
307 void AddMessageToDevToolsConsole(content::ConsoleMessageLevel level, 303 void AddMessageToDevToolsConsole(content::ConsoleMessageLevel level,
308 const std::string& message); 304 const std::string& message);
309 305
310 // Saves the window geometry/position/screen bounds. 306 // Saves the window geometry/position/screen bounds.
311 void SaveWindowPosition(); 307 void SaveWindowPosition();
312 308
313 // Helper method to adjust the cached bounds so that we can make sure it can 309 // Helper method to adjust the cached bounds so that we can make sure it can
314 // be visible on the screen. See http://crbug.com/145752 . 310 // be visible on the screen. See http://crbug.com/145752 .
315 void AdjustBoundsToBeVisibleOnScreen( 311 void AdjustBoundsToBeVisibleOnScreen(
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 bool fullscreen_for_window_api_; 370 bool fullscreen_for_window_api_;
375 // Fullscreen entered by HTML requestFullscreen. 371 // Fullscreen entered by HTML requestFullscreen.
376 bool fullscreen_for_tab_; 372 bool fullscreen_for_tab_;
377 373
378 DISALLOW_COPY_AND_ASSIGN(ShellWindow); 374 DISALLOW_COPY_AND_ASSIGN(ShellWindow);
379 }; 375 };
380 376
381 } // namespace apps 377 } // namespace apps
382 378
383 #endif // APPS_SHELL_WINDOW_H_ 379 #endif // APPS_SHELL_WINDOW_H_
OLDNEW
« no previous file with comments | « no previous file | trunk/src/apps/shell_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698