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

Unified 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: Addressed Nasko's comments 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 side-by-side diff with in-line comments
Download patch
Index: extensions/browser/app_window/app_window.h
diff --git a/extensions/browser/app_window/app_window.h b/extensions/browser/app_window/app_window.h
index 4a06269bd05b5f04cba88e6d67d26d40586e0e82..40ff84f4627e1b038e5eb9684c51328fb33d05d8 100644
--- a/extensions/browser/app_window/app_window.h
+++ b/extensions/browser/app_window/app_window.h
@@ -242,6 +242,13 @@ class AppWindow : public content::WebContentsDelegate,
// is on startup and from within UpdateWindowTitle().
base::string16 GetTitle() const;
+ // |callback| will then be called when the first navigation in the window is
+ // ready to commit.
+ void SetOnFirstCommitCallback(base::Callback<void(void)> callback);
Devlin 2015/09/16 21:44:04 const base::Closure& is cleaner. :)
clamy 2015/09/16 22:19:39 Done.
+
+ // Called when the first navigation in the window is ready to commit.
+ void OnReadyToCommit();
+
// Call to notify ShellRegistry and delete the window. Subclasses should
// invoke this method instead of using "delete this".
void OnNativeClose();
@@ -555,6 +562,9 @@ class AppWindow : public content::WebContentsDelegate,
// Whether |is_ime_window| was set in the CreateParams.
bool is_ime_window_;
+ // PlzNavigate: this is called when the first navigation is ready to commit.
+ base::Callback<void(void)> on_first_commit_callback_;
Devlin 2015/09/16 21:44:04 base::Closure
clamy 2015/09/16 22:19:39 Done.
+
base::WeakPtrFactory<AppWindow> image_loader_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(AppWindow);

Powered by Google App Engine
This is Rietveld 408576698