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/examples/html_viewer/html_document_view.h

Issue 383123006: Preliminary interactive layout of window manager's demo_launcher (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Looks Good Created 6 years, 5 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
« no previous file with comments | « mojo/examples/browser/browser.cc ('k') | mojo/examples/html_viewer/html_document_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/examples/html_viewer/html_document_view.h
diff --git a/mojo/examples/html_viewer/html_document_view.h b/mojo/examples/html_viewer/html_document_view.h
index 8c324a5ee2c3806067b5e0bd34ed406be856932b..6d843abc63da49726fd5da06d98131d16d39fd7a 100644
--- a/mojo/examples/html_viewer/html_document_view.h
+++ b/mojo/examples/html_viewer/html_document_view.h
@@ -9,6 +9,7 @@
#include "base/memory/weak_ptr.h"
#include "mojo/public/cpp/application/lazy_interface_ptr.h"
#include "mojo/public/interfaces/service_provider/service_provider.mojom.h"
+#include "mojo/services/public/cpp/view_manager/node_observer.h"
#include "mojo/services/public/cpp/view_manager/view_observer.h"
#include "mojo/services/public/interfaces/navigation/navigation.mojom.h"
#include "mojo/services/public/interfaces/network/url_loader.mojom.h"
@@ -28,7 +29,8 @@ namespace examples {
// A view for a single HTML document.
class HTMLDocumentView : public blink::WebViewClient,
public blink::WebFrameClient,
- public view_manager::ViewObserver {
+ public view_manager::ViewObserver,
+ public view_manager::NodeObserver {
public:
HTMLDocumentView(ServiceProvider* service_provider,
view_manager::ViewManager* view_manager);
@@ -65,11 +67,18 @@ class HTMLDocumentView : public blink::WebViewClient,
virtual void OnViewInputEvent(view_manager::View* view,
const EventPtr& event) OVERRIDE;
+ // NodeObserver methods:
+ virtual void OnNodeBoundsChanged(view_manager::Node* node,
+ const gfx::Rect& old_bounds,
+ const gfx::Rect& new_bounds) OVERRIDE;
+ virtual void OnNodeDestroyed(view_manager::Node* node) OVERRIDE;
+
void Repaint();
view_manager::ViewManager* view_manager_;
view_manager::View* view_;
blink::WebView* web_view_;
+ view_manager::Node* root_;
bool repaint_pending_;
LazyInterfacePtr<navigation::NavigatorHost> navigator_host_;
« no previous file with comments | « mojo/examples/browser/browser.cc ('k') | mojo/examples/html_viewer/html_document_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698