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

Unified Diff: mojo/services/html_viewer/html_document_view.h

Issue 469803005: Mojo: simple iframe support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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: mojo/services/html_viewer/html_document_view.h
diff --git a/mojo/services/html_viewer/html_document_view.h b/mojo/services/html_viewer/html_document_view.h
index af315bb75fb25c9e3f1b13abd0c016eb25d27d14..fccd5a9453345f75b88a8b028117f58399167760 100644
--- a/mojo/services/html_viewer/html_document_view.h
+++ b/mojo/services/html_viewer/html_document_view.h
@@ -19,9 +19,42 @@ namespace mojo {
class ViewManager;
class View;
+class SimpleFrameClient : public blink::WebFrameClient {
+ public:
+ SimpleFrameClient(ServiceProvider* service_provider, Id root_id);
+ virtual ~SimpleFrameClient();
+
+ protected:
+ // WebFrameClient methods:
+ virtual blink::WebFrame* createChildFrame(blink::WebLocalFrame* parent,
+ const blink::WebString& frameName);
+ virtual void didDisownOpener(blink::WebLocalFrame*);
+ virtual void frameDetached(blink::WebFrame*);
+ virtual void frameFocused();
+ virtual void willClose(blink::WebFrame*);
+ virtual blink::WebCookieJar* cookieJar(blink::WebLocalFrame* frame);
+ virtual blink::WebNavigationPolicy decidePolicyForNavigation(
+ blink::WebLocalFrame* frame, blink::WebDataSource::ExtraData* data,
+ const blink::WebURLRequest& request, blink::WebNavigationType nav_type,
+ blink::WebNavigationPolicy default_policy, bool isRedirect);
+ virtual void didAddMessageToConsole(
+ const blink::WebConsoleMessage& message,
+ const blink::WebString& source_name,
+ unsigned source_line,
+ const blink::WebString& stack_trace);
+ virtual void didNavigateWithinPage(
+ blink::WebLocalFrame* frame,
+ const blink::WebHistoryItem& history_item,
+ blink::WebHistoryCommitType commit_type);
+
+ ServiceProvider* service_provider_;
+ LazyInterfacePtr<NavigatorHost> navigator_host_;
+ Id root_id_;
+};
+
// A view for a single HTML document.
class HTMLDocumentView : public blink::WebViewClient,
- public blink::WebFrameClient,
+ public SimpleFrameClient,
darin (slow to review) 2014/08/14 23:45:52 perhaps it would be better to use composition here
public ViewObserver {
public:
HTMLDocumentView(ServiceProvider* service_provider,
@@ -40,22 +73,6 @@ class HTMLDocumentView : public blink::WebViewClient,
virtual void didInvalidateRect(const blink::WebRect& rect);
virtual bool allowsBrokenNullLayerTreeView() const;
- // WebFrameClient methods:
- virtual blink::WebCookieJar* cookieJar(blink::WebLocalFrame* frame);
- virtual blink::WebNavigationPolicy decidePolicyForNavigation(
- blink::WebLocalFrame* frame, blink::WebDataSource::ExtraData* data,
- const blink::WebURLRequest& request, blink::WebNavigationType nav_type,
- blink::WebNavigationPolicy default_policy, bool isRedirect);
- virtual void didAddMessageToConsole(
- const blink::WebConsoleMessage& message,
- const blink::WebString& source_name,
- unsigned source_line,
- const blink::WebString& stack_trace);
- virtual void didNavigateWithinPage(
- blink::WebLocalFrame* frame,
- const blink::WebHistoryItem& history_item,
- blink::WebHistoryCommitType commit_type);
-
// ViewObserver methods:
virtual void OnViewBoundsChanged(View* view,
const gfx::Rect& old_bounds,
@@ -66,11 +83,9 @@ class HTMLDocumentView : public blink::WebViewClient,
void Repaint();
ViewManager* view_manager_;
- View* view_;
blink::WebView* web_view_;
View* root_;
bool repaint_pending_;
- LazyInterfacePtr<NavigatorHost> navigator_host_;
base::WeakPtrFactory<HTMLDocumentView> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(HTMLDocumentView);
« no previous file with comments | « no previous file | mojo/services/html_viewer/html_document_view.cc » ('j') | mojo/services/html_viewer/html_document_view.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698