navigator.h revision a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7
1f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)// Copyright 2013 The Chromium Authors. All rights reserved. 2f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be 3f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)// found in the LICENSE file. 4f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) 5f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)#ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_H_ 6f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)#define CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_H_ 7f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) 8f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)#include "base/memory/ref_counted.h" 9f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)#include "content/common/content_export.h" 10f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) 11a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)class GURL; 12a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles) 13f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)namespace content { 14f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) 15f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)class NavigationControllerImpl; 16f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)class NavigatorDelegate; 17a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)class RenderFrameHostImpl; 18f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) 19a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)// Implementations of this interface are responsible for performing navigations 20a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)// in a node of the FrameTree. Its lifetime is bound to all FrameTreeNode 21a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)// objects that are using it and will be released once all nodes that use it are 22a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)// freed. The Navigator is bound to a single frame tree and cannot be used by 23a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)// multiple instances of FrameTree. 24f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)// TODO(nasko): Move all navigation methods, such as didStartProvisionalLoad 25a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)// from WebContentsImpl to this interface. 26f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)class CONTENT_EXPORT Navigator : public base::RefCounted<Navigator> { 27f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) public: 28a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles) // The RenderFrameHostImpl started a provisional load. 29a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles) virtual void DidStartProvisionalLoad(RenderFrameHostImpl* render_frame_host, 30a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles) int64 frame_id, 31a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles) int64 parent_frame_id, 32a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles) bool main_frame, 33a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles) const GURL& url) {}; 34a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles) 35a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles) protected: 36f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) friend class base::RefCounted<Navigator>; 37f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) virtual ~Navigator() {} 38f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)}; 39f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) 40f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)} // namespace content 41f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) 42f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)#endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_H_ 43