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

Unified Diff: chrome/browser/ui/views/html_dialog_view_browsertest.cc

Issue 8021009: Consolidate message observer API for win and aura (and touch). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 9 years, 3 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: chrome/browser/ui/views/html_dialog_view_browsertest.cc
diff --git a/chrome/browser/ui/views/html_dialog_view_browsertest.cc b/chrome/browser/ui/views/html_dialog_view_browsertest.cc
index 8ef4c15bd5dec308f4caac4f38f41914b1d754e8..77f23545d55f3ed7156dcc3659fb80d09b2106ed 100644
--- a/chrome/browser/ui/views/html_dialog_view_browsertest.cc
+++ b/chrome/browser/ui/views/html_dialog_view_browsertest.cc
@@ -77,10 +77,13 @@ class HtmlDialogBrowserTest : public InProcessBrowserTest {
}
// This method is called before processing a message.
- virtual void WillProcessMessage(const MSG& msg) {}
+ virtual base::EventStatus WillProcessEvent(
+ const MSG& msg) OVERRIDE {
msw 2011/09/27 01:16:46 name/type (here and below), this should fit on a s
oshima 2011/09/27 02:12:12 Done.
+ return base::EVENT_CONTINUE;
+ }
// This method is called after processing a message.
- virtual void DidProcessMessage(const MSG& msg) {
+ virtual void DidProcessEvent(const MSG& msg) OVERRIDE {
// Either WM_PAINT or WM_TIMER indicates the actual work of
// pushing through the window resizing messages is done since
// they are lower priority (we don't get to see the
@@ -89,7 +92,28 @@ class HtmlDialogBrowserTest : public InProcessBrowserTest {
MessageLoop::current()->Quit();
}
};
-#elif !defined(OS_MACOSX)
+#elif defined(TOUCH_UI) || defined(USE_AURA)
+ class WindowChangedObserver : public MessageLoopForUI::Observer {
+ public:
+ WindowChangedObserver() {}
+
+ static WindowChangedObserver* GetInstance() {
+ return Singleton<WindowChangedObserver>::get();
+ }
+
+ // This method is called before processing a message.
+ virtual base::EventStatus WillProcessEvent(const base::NativeEvent& event) {
+ return base::EVENT_CONTINUE;
+ }
+
+ // This method is called after processing a message.
+ virtual void DidProcessEvent(const base::NativeEvent& event) {
+ // TODO(oshima): X11/Xlib.h imports various definitions that
+ // caused compilation error.
+ NOTIMPLEMENTED();
+ }
+ };
+#elif defined(TOOLKIT_USES_GTK)
class WindowChangedObserver : public MessageLoopForUI::Observer {
public:
WindowChangedObserver() {}
@@ -145,6 +169,7 @@ IN_PROC_BROWSER_TEST_F(HtmlDialogBrowserTest, MAYBE_SizeWindow) {
gfx::Rect actual_bounds, rwhv_bounds;
// Bigger than the default in both dimensions.
+
set_bounds.set_width(400);
set_bounds.set_height(300);

Powered by Google App Engine
This is Rietveld 408576698