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

Side by Side Diff: chrome/browser/sync/sessions/sync_sessions_router_tab_helper.h

Issue 2824073002: [sync] Prevent sessions flare on startup (Closed)
Patch Set: Disable test on android Created 3 years, 8 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 CHROME_BROWSER_SYNC_SESSIONS_SYNC_SESSIONS_ROUTER_TAB_HELPER_H_ 5 #ifndef CHROME_BROWSER_SYNC_SESSIONS_SYNC_SESSIONS_ROUTER_TAB_HELPER_H_
6 #define CHROME_BROWSER_SYNC_SESSIONS_SYNC_SESSIONS_ROUTER_TAB_HELPER_H_ 6 #define CHROME_BROWSER_SYNC_SESSIONS_SYNC_SESSIONS_ROUTER_TAB_HELPER_H_
7 7
8 #include "components/sessions/core/session_id.h" 8 #include "components/sessions/core/session_id.h"
9 #include "content/public/browser/web_contents_observer.h" 9 #include "content/public/browser/web_contents_observer.h"
10 #include "content/public/browser/web_contents_user_data.h" 10 #include "content/public/browser/web_contents_user_data.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 const GURL& validated_url) override; 53 const GURL& validated_url) override;
54 void DidOpenRequestedURL(content::WebContents* new_contents, 54 void DidOpenRequestedURL(content::WebContents* new_contents,
55 content::RenderFrameHost* source_render_frame_host, 55 content::RenderFrameHost* source_render_frame_host,
56 const GURL& url, 56 const GURL& url,
57 const content::Referrer& referrer, 57 const content::Referrer& referrer,
58 WindowOpenDisposition disposition, 58 WindowOpenDisposition disposition,
59 ui::PageTransition transition, 59 ui::PageTransition transition,
60 bool started_from_context_menu, 60 bool started_from_context_menu,
61 bool renderer_initiated) override; 61 bool renderer_initiated) override;
62 62
63 void NotifyRouter(); 63 void NotifyRouter(bool page_load_completed = false);
64 64
65 // |router_| is a KeyedService and is guaranteed to outlive |this|. 65 // |router_| is a KeyedService and is guaranteed to outlive |this|.
66 SyncSessionsWebContentsRouter* router_; 66 SyncSessionsWebContentsRouter* router_;
67 // Tab id of the tab from which this tab was created. Example events that 67 // Tab id of the tab from which this tab was created. Example events that
68 // create this relationship: 68 // create this relationship:
69 // * From context menu, "Open link in new tab". 69 // * From context menu, "Open link in new tab".
70 // * From context menu, "Open link in new window". 70 // * From context menu, "Open link in new window".
71 // * Ctrl-click. 71 // * Ctrl-click.
72 // * Click on a link with target='_blank'. 72 // * Click on a link with target='_blank'.
73 SessionID::id_type source_tab_id_; 73 SessionID::id_type source_tab_id_;
74 74
75 DISALLOW_COPY_AND_ASSIGN(SyncSessionsRouterTabHelper); 75 DISALLOW_COPY_AND_ASSIGN(SyncSessionsRouterTabHelper);
76 }; 76 };
77 77
78 } // namespace sync_sessions 78 } // namespace sync_sessions
79 79
80 #endif // CHROME_BROWSER_SYNC_SESSIONS_SYNC_SESSIONS_ROUTER_TAB_HELPER_H_ 80 #endif // CHROME_BROWSER_SYNC_SESSIONS_SYNC_SESSIONS_ROUTER_TAB_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698