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

Side by Side Diff: components/html_viewer/html_frame_delegate.h

Issue 1674903003: Extract shell methods from ApplicationImpl into a base class, and pass this to Initialize() instead. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojom
Patch Set: . Created 4 years, 10 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
« no previous file with comments | « components/html_viewer/html_frame_apptest.cc ('k') | components/html_viewer/html_viewer.h » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 COMPONENTS_HTML_VIEWER_HTML_FRAME_DELEGATE_H_ 5 #ifndef COMPONENTS_HTML_VIEWER_HTML_FRAME_DELEGATE_H_
6 #define COMPONENTS_HTML_VIEWER_HTML_FRAME_DELEGATE_H_ 6 #define COMPONENTS_HTML_VIEWER_HTML_FRAME_DELEGATE_H_
7 7
8 namespace mojo { 8 namespace mojo {
9 class ApplicationImpl; 9 class Shell;
10 } 10 }
11 11
12 namespace html_viewer { 12 namespace html_viewer {
13 13
14 class HTMLFactory; 14 class HTMLFactory;
15 class HTMLFrame; 15 class HTMLFrame;
16 16
17 class HTMLFrameDelegate { 17 class HTMLFrameDelegate {
18 public: 18 public:
19 // Returns the ApplicationImpl for the frame. 19 // Returns the Shell for the frame.
20 virtual mojo::ApplicationImpl* GetApp() = 0; 20 virtual mojo::Shell* GetShell() = 0;
21 21
22 // Returns the factory for creating various classes. 22 // Returns the factory for creating various classes.
23 virtual HTMLFactory* GetHTMLFactory() = 0; 23 virtual HTMLFactory* GetHTMLFactory() = 0;
24 24
25 // Invoked when the Frame the delegate is attached to finishes loading. This 25 // Invoked when the Frame the delegate is attached to finishes loading. This
26 // is not invoked for any child frames, only the frame returned from 26 // is not invoked for any child frames, only the frame returned from
27 // HTMLFrameTreeManager::CreateFrameAndAttachToTree(). 27 // HTMLFrameTreeManager::CreateFrameAndAttachToTree().
28 virtual void OnFrameDidFinishLoad() = 0; 28 virtual void OnFrameDidFinishLoad() = 0;
29 29
30 // Invoked when the HTMLFrame the delegate is associated with is swapped 30 // Invoked when the HTMLFrame the delegate is associated with is swapped
31 // to a remote frame. 31 // to a remote frame.
32 virtual void OnFrameSwappedToRemote() = 0; 32 virtual void OnFrameSwappedToRemote() = 0;
33 33
34 // Invoked when this delegate is to take over from |old_delegate| (which may 34 // Invoked when this delegate is to take over from |old_delegate| (which may
35 // be null). This is invoked when a new connection is established and we 35 // be null). This is invoked when a new connection is established and we
36 // are already rendering to the supplied frame. 36 // are already rendering to the supplied frame.
37 virtual void OnSwap(HTMLFrame* frame, HTMLFrameDelegate* old_delegate) = 0; 37 virtual void OnSwap(HTMLFrame* frame, HTMLFrameDelegate* old_delegate) = 0;
38 38
39 // Invoked when the HTMLFrame is destroyed. 39 // Invoked when the HTMLFrame is destroyed.
40 virtual void OnFrameDestroyed() = 0; 40 virtual void OnFrameDestroyed() = 0;
41 41
42 protected: 42 protected:
43 virtual ~HTMLFrameDelegate() {} 43 virtual ~HTMLFrameDelegate() {}
44 }; 44 };
45 45
46 } // namespace html_viewer 46 } // namespace html_viewer
47 47
48 #endif // COMPONENTS_HTML_VIEWER_HTML_FRAME_DELEGATE_H_ 48 #endif // COMPONENTS_HTML_VIEWER_HTML_FRAME_DELEGATE_H_
OLDNEW
« no previous file with comments | « components/html_viewer/html_frame_apptest.cc ('k') | components/html_viewer/html_viewer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698