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

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

Issue 7977012: Adds a NonClientFrameView for generic toplevel windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/aura/cursor.h ('k') | ui/aura/desktop.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 19 matching lines...) Expand all
30 explicit DemoWindowDelegate(SkColor color) : color_(color) {} 30 explicit DemoWindowDelegate(SkColor color) : color_(color) {}
31 31
32 // Overridden from WindowDelegate: 32 // Overridden from WindowDelegate:
33 virtual void OnBoundsChanged(const gfx::Rect& old_bounds, 33 virtual void OnBoundsChanged(const gfx::Rect& old_bounds,
34 const gfx::Rect& new_bounds) OVERRIDE {} 34 const gfx::Rect& new_bounds) OVERRIDE {}
35 virtual void OnFocus() OVERRIDE {} 35 virtual void OnFocus() OVERRIDE {}
36 virtual void OnBlur() OVERRIDE {} 36 virtual void OnBlur() OVERRIDE {}
37 virtual bool OnKeyEvent(aura::KeyEvent* event) OVERRIDE { 37 virtual bool OnKeyEvent(aura::KeyEvent* event) OVERRIDE {
38 return false; 38 return false;
39 } 39 }
40
41 virtual int GetNonClientComponent(const gfx::Point& point) const OVERRIDE { 40 virtual int GetNonClientComponent(const gfx::Point& point) const OVERRIDE {
42 return HTCAPTION; 41 return HTCAPTION;
43 } 42 }
44
45 virtual bool OnMouseEvent(aura::MouseEvent* event) OVERRIDE { 43 virtual bool OnMouseEvent(aura::MouseEvent* event) OVERRIDE {
46 return true; 44 return true;
47 } 45 }
48 46 virtual void OnCaptureLost() OVERRIDE {}
49 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE { 47 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE {
50 canvas->AsCanvasSkia()->drawColor(color_, SkXfermode::kSrc_Mode); 48 canvas->AsCanvasSkia()->drawColor(color_, SkXfermode::kSrc_Mode);
51 } 49 }
52
53 virtual void OnWindowDestroying() OVERRIDE {} 50 virtual void OnWindowDestroying() OVERRIDE {}
54 virtual void OnWindowDestroyed() OVERRIDE {} 51 virtual void OnWindowDestroyed() OVERRIDE {}
55 52
56 private: 53 private:
57 SkColor color_; 54 SkColor color_;
58 55
59 DISALLOW_COPY_AND_ASSIGN(DemoWindowDelegate); 56 DISALLOW_COPY_AND_ASSIGN(DemoWindowDelegate);
60 }; 57 };
61 58
62 59
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 window3.set_id(3); 100 window3.set_id(3);
104 window3.Init(); 101 window3.Init();
105 window3.SetBounds(gfx::Rect(10, 10, 50, 50), 0); 102 window3.SetBounds(gfx::Rect(10, 10, 50, 50), 0);
106 window3.SetVisibility(aura::Window::VISIBILITY_SHOWN); 103 window3.SetVisibility(aura::Window::VISIBILITY_SHOWN);
107 window3.SetParent(&window2); 104 window3.SetParent(&window2);
108 105
109 aura::Desktop::GetInstance()->Run(); 106 aura::Desktop::GetInstance()->Run();
110 return 0; 107 return 0;
111 } 108 }
112 109
OLDNEW
« no previous file with comments | « ui/aura/cursor.h ('k') | ui/aura/desktop.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698