OLD | NEW |
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 MOJO_SERVICES_HTML_VIEWER_HTML_DOCUMENT_VIEW_H_ | 5 #ifndef MOJO_SERVICES_HTML_VIEWER_HTML_DOCUMENT_VIEW_H_ |
6 #define MOJO_SERVICES_HTML_VIEWER_HTML_DOCUMENT_VIEW_H_ | 6 #define MOJO_SERVICES_HTML_VIEWER_HTML_DOCUMENT_VIEW_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "mojo/public/cpp/application/lazy_interface_ptr.h" | 10 #include "mojo/public/cpp/application/lazy_interface_ptr.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 | 34 |
35 private: | 35 private: |
36 // WebViewClient methods: | 36 // WebViewClient methods: |
37 virtual blink::WebStorageNamespace* createSessionStorageNamespace(); | 37 virtual blink::WebStorageNamespace* createSessionStorageNamespace(); |
38 | 38 |
39 // WebWidgetClient methods: | 39 // WebWidgetClient methods: |
40 virtual void didInvalidateRect(const blink::WebRect& rect); | 40 virtual void didInvalidateRect(const blink::WebRect& rect); |
41 virtual bool allowsBrokenNullLayerTreeView() const; | 41 virtual bool allowsBrokenNullLayerTreeView() const; |
42 | 42 |
43 // WebFrameClient methods: | 43 // WebFrameClient methods: |
| 44 virtual blink::WebFrame* createChildFrame(blink::WebLocalFrame* parent, |
| 45 const blink::WebString& frameName); |
| 46 virtual void didDisownOpener(blink::WebLocalFrame*); |
| 47 virtual void frameDetached(blink::WebFrame*); |
| 48 virtual void frameFocused(); |
| 49 virtual void willClose(blink::WebFrame*); |
44 virtual blink::WebCookieJar* cookieJar(blink::WebLocalFrame* frame); | 50 virtual blink::WebCookieJar* cookieJar(blink::WebLocalFrame* frame); |
45 virtual blink::WebNavigationPolicy decidePolicyForNavigation( | 51 virtual blink::WebNavigationPolicy decidePolicyForNavigation( |
46 blink::WebLocalFrame* frame, blink::WebDataSource::ExtraData* data, | 52 blink::WebLocalFrame* frame, blink::WebDataSource::ExtraData* data, |
47 const blink::WebURLRequest& request, blink::WebNavigationType nav_type, | 53 const blink::WebURLRequest& request, blink::WebNavigationType nav_type, |
48 blink::WebNavigationPolicy default_policy, bool isRedirect); | 54 blink::WebNavigationPolicy default_policy, bool isRedirect); |
49 virtual void didAddMessageToConsole( | 55 virtual void didAddMessageToConsole( |
50 const blink::WebConsoleMessage& message, | 56 const blink::WebConsoleMessage& message, |
51 const blink::WebString& source_name, | 57 const blink::WebString& source_name, |
52 unsigned source_line, | 58 unsigned source_line, |
53 const blink::WebString& stack_trace); | 59 const blink::WebString& stack_trace); |
54 virtual void didNavigateWithinPage( | 60 virtual void didNavigateWithinPage( |
55 blink::WebLocalFrame* frame, | 61 blink::WebLocalFrame* frame, |
56 const blink::WebHistoryItem& history_item, | 62 const blink::WebHistoryItem& history_item, |
57 blink::WebHistoryCommitType commit_type); | 63 blink::WebHistoryCommitType commit_type); |
58 | 64 |
59 // ViewObserver methods: | 65 // ViewObserver methods: |
60 virtual void OnViewBoundsChanged(View* view, | 66 virtual void OnViewBoundsChanged(View* view, |
61 const gfx::Rect& old_bounds, | 67 const gfx::Rect& old_bounds, |
62 const gfx::Rect& new_bounds) OVERRIDE; | 68 const gfx::Rect& new_bounds) OVERRIDE; |
63 virtual void OnViewDestroyed(View* view) OVERRIDE; | 69 virtual void OnViewDestroyed(View* view) OVERRIDE; |
64 virtual void OnViewInputEvent(View* view, const EventPtr& event) OVERRIDE; | 70 virtual void OnViewInputEvent(View* view, const EventPtr& event) OVERRIDE; |
65 | 71 |
66 void Repaint(); | 72 void Repaint(); |
67 | 73 |
68 ViewManager* view_manager_; | 74 ViewManager* view_manager_; |
69 View* view_; | 75 LazyInterfacePtr<NavigatorHost> navigator_host_; |
70 blink::WebView* web_view_; | 76 blink::WebView* web_view_; |
71 View* root_; | 77 View* root_; |
72 bool repaint_pending_; | 78 bool repaint_pending_; |
73 LazyInterfacePtr<NavigatorHost> navigator_host_; | |
74 | 79 |
75 base::WeakPtrFactory<HTMLDocumentView> weak_factory_; | 80 base::WeakPtrFactory<HTMLDocumentView> weak_factory_; |
76 DISALLOW_COPY_AND_ASSIGN(HTMLDocumentView); | 81 DISALLOW_COPY_AND_ASSIGN(HTMLDocumentView); |
77 }; | 82 }; |
78 | 83 |
79 } // namespace mojo | 84 } // namespace mojo |
80 | 85 |
81 #endif // MOJO_SERVICES_HTML_VIEWER_HTML_DOCUMENT_VIEW_H_ | 86 #endif // MOJO_SERVICES_HTML_VIEWER_HTML_DOCUMENT_VIEW_H_ |
OLD | NEW |