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

Side by Side Diff: extensions/browser/app_window/app_window.h

Issue 1340163002: PlzNavigate: fix timing issue in app window creation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@navigation-throttle
Patch Set: Created 5 years, 3 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_APP_WINDOW_APP_WINDOW_H_ 5 #ifndef EXTENSIONS_BROWSER_APP_WINDOW_APP_WINDOW_H_
6 #define EXTENSIONS_BROWSER_APP_WINDOW_APP_WINDOW_H_ 6 #define EXTENSIONS_BROWSER_APP_WINDOW_APP_WINDOW_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 NativeAppWindow* GetBaseWindow(); 235 NativeAppWindow* GetBaseWindow();
236 gfx::NativeWindow GetNativeWindow(); 236 gfx::NativeWindow GetNativeWindow();
237 237
238 // Returns the bounds that should be reported to the renderer. 238 // Returns the bounds that should be reported to the renderer.
239 gfx::Rect GetClientBounds() const; 239 gfx::Rect GetClientBounds() const;
240 240
241 // NativeAppWindows should call this to determine what the window's title 241 // NativeAppWindows should call this to determine what the window's title
242 // is on startup and from within UpdateWindowTitle(). 242 // is on startup and from within UpdateWindowTitle().
243 base::string16 GetTitle() const; 243 base::string16 GetTitle() const;
244 244
245 // |callback| will then be called when the first navigation in the window is
246 // ready to commit.
247 void SetOnFirstCommitCallback(base::Callback<void(void)> callback);
248
249 // Called when the first navigation in the window is ready to commit.
250 void OnFirstCommit();
nasko 2015/09/16 20:19:36 OnFirstCommit implies that the commit has happened
clamy 2015/09/16 21:32:35 Done.
251
245 // Call to notify ShellRegistry and delete the window. Subclasses should 252 // Call to notify ShellRegistry and delete the window. Subclasses should
246 // invoke this method instead of using "delete this". 253 // invoke this method instead of using "delete this".
247 void OnNativeClose(); 254 void OnNativeClose();
248 255
249 // Should be called by native implementations when the window size, position, 256 // Should be called by native implementations when the window size, position,
250 // or minimized/maximized state has changed. 257 // or minimized/maximized state has changed.
251 void OnNativeWindowChanged(); 258 void OnNativeWindowChanged();
252 259
253 // Should be called by native implementations when the window is activated. 260 // Should be called by native implementations when the window is activated.
254 void OnNativeWindowActivated(); 261 void OnNativeWindowActivated();
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 // reinstated when the window exits fullscreen and moves away from the 555 // reinstated when the window exits fullscreen and moves away from the
549 // taskbar. 556 // taskbar.
550 bool cached_always_on_top_; 557 bool cached_always_on_top_;
551 558
552 // Whether |alpha_enabled| was set in the CreateParams. 559 // Whether |alpha_enabled| was set in the CreateParams.
553 bool requested_alpha_enabled_; 560 bool requested_alpha_enabled_;
554 561
555 // Whether |is_ime_window| was set in the CreateParams. 562 // Whether |is_ime_window| was set in the CreateParams.
556 bool is_ime_window_; 563 bool is_ime_window_;
557 564
565 // PlzNavigate: this is called when the first navigation is ready to commit.
566 base::Callback<void(void)> on_first_commit_callback_;
567
558 base::WeakPtrFactory<AppWindow> image_loader_ptr_factory_; 568 base::WeakPtrFactory<AppWindow> image_loader_ptr_factory_;
559 569
560 DISALLOW_COPY_AND_ASSIGN(AppWindow); 570 DISALLOW_COPY_AND_ASSIGN(AppWindow);
561 }; 571 };
562 572
563 } // namespace extensions 573 } // namespace extensions
564 574
565 #endif // EXTENSIONS_BROWSER_APP_WINDOW_APP_WINDOW_H_ 575 #endif // EXTENSIONS_BROWSER_APP_WINDOW_APP_WINDOW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698