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

Side by Side Diff: ui/aura/demo/demo_main.cc

Issue 8618009: Aura: Fix window resizing for large drags. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix HtmlDialogBrowserTest Created 9 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "base/at_exit.h" 5 #include "base/at_exit.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/i18n/icu_util.h" 7 #include "base/i18n/icu_util.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "third_party/skia/include/core/SkXfermode.h" 10 #include "third_party/skia/include/core/SkXfermode.h"
(...skipping 13 matching lines...) Expand all
24 #endif 24 #endif
25 25
26 namespace { 26 namespace {
27 27
28 // Trivial WindowDelegate implementation that draws a colored background. 28 // Trivial WindowDelegate implementation that draws a colored background.
29 class DemoWindowDelegate : public aura::WindowDelegate { 29 class DemoWindowDelegate : public aura::WindowDelegate {
30 public: 30 public:
31 explicit DemoWindowDelegate(SkColor color) : color_(color) {} 31 explicit DemoWindowDelegate(SkColor color) : color_(color) {}
32 32
33 // Overridden from WindowDelegate: 33 // Overridden from WindowDelegate:
34 virtual void OnBoundsChanging(gfx::Rect* new_bounds) OVERRIDE {} 34 virtual gfx::Size GetMinimumSize() const OVERRIDE {
35 return gfx::Size();
36 }
35 virtual void OnBoundsChanged(const gfx::Rect& old_bounds, 37 virtual void OnBoundsChanged(const gfx::Rect& old_bounds,
36 const gfx::Rect& new_bounds) OVERRIDE {} 38 const gfx::Rect& new_bounds) OVERRIDE {}
37 virtual void OnFocus() OVERRIDE {} 39 virtual void OnFocus() OVERRIDE {}
38 virtual void OnBlur() OVERRIDE {} 40 virtual void OnBlur() OVERRIDE {}
39 virtual bool OnKeyEvent(aura::KeyEvent* event) OVERRIDE { 41 virtual bool OnKeyEvent(aura::KeyEvent* event) OVERRIDE {
40 return false; 42 return false;
41 } 43 }
42 virtual gfx::NativeCursor GetCursor(const gfx::Point& point) OVERRIDE { 44 virtual gfx::NativeCursor GetCursor(const gfx::Point& point) OVERRIDE {
43 return gfx::kNullCursor; 45 return gfx::kNullCursor;
44 } 46 }
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 window3.SetBounds(gfx::Rect(10, 10, 50, 50)); 113 window3.SetBounds(gfx::Rect(10, 10, 50, 50));
112 window3.Show(); 114 window3.Show();
113 window3.SetParent(&window2); 115 window3.SetParent(&window2);
114 116
115 aura::Desktop::GetInstance()->Run(); 117 aura::Desktop::GetInstance()->Run();
116 118
117 ui::CompositorTestSupport::Terminate(); 119 ui::CompositorTestSupport::Terminate();
118 120
119 return 0; 121 return 0;
120 } 122 }
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_aura.cc ('k') | ui/aura/test/test_window_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698