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

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

Issue 8894018: Move the concept of Activation to the Shell. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years 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/client/stacking_client.h ('k') | ui/aura/root_window.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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 virtual int GetNonClientComponent(const gfx::Point& point) const OVERRIDE { 47 virtual int GetNonClientComponent(const gfx::Point& point) const OVERRIDE {
48 return HTCAPTION; 48 return HTCAPTION;
49 } 49 }
50 virtual bool OnMouseEvent(aura::MouseEvent* event) OVERRIDE { 50 virtual bool OnMouseEvent(aura::MouseEvent* event) OVERRIDE {
51 return true; 51 return true;
52 } 52 }
53 virtual ui::TouchStatus OnTouchEvent(aura::TouchEvent* event) OVERRIDE { 53 virtual ui::TouchStatus OnTouchEvent(aura::TouchEvent* event) OVERRIDE {
54 return ui::TOUCH_STATUS_END; 54 return ui::TOUCH_STATUS_END;
55 } 55 }
56 virtual bool CanFocus() OVERRIDE { return true; } 56 virtual bool CanFocus() OVERRIDE { return true; }
57 virtual bool ShouldActivate(aura::Event* event) OVERRIDE { return true; }
58 virtual void OnActivated() OVERRIDE {}
59 virtual void OnLostActive() OVERRIDE {}
60 virtual void OnCaptureLost() OVERRIDE {} 57 virtual void OnCaptureLost() OVERRIDE {}
61 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE { 58 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE {
62 canvas->GetSkCanvas()->drawColor(color_, SkXfermode::kSrc_Mode); 59 canvas->GetSkCanvas()->drawColor(color_, SkXfermode::kSrc_Mode);
63 } 60 }
64 virtual void OnWindowDestroying() OVERRIDE {} 61 virtual void OnWindowDestroying() OVERRIDE {}
65 virtual void OnWindowDestroyed() OVERRIDE {} 62 virtual void OnWindowDestroyed() OVERRIDE {}
66 virtual void OnWindowVisibilityChanged(bool visible) OVERRIDE {} 63 virtual void OnWindowVisibilityChanged(bool visible) OVERRIDE {}
67 64
68 private: 65 private:
69 SkColor color_; 66 SkColor color_;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 window3.SetBounds(gfx::Rect(10, 10, 50, 50)); 111 window3.SetBounds(gfx::Rect(10, 10, 50, 50));
115 window3.Show(); 112 window3.Show();
116 window3.SetParent(&window2); 113 window3.SetParent(&window2);
117 114
118 aura::RootWindow::GetInstance()->Run(); 115 aura::RootWindow::GetInstance()->Run();
119 116
120 ui::CompositorTestSupport::Terminate(); 117 ui::CompositorTestSupport::Terminate();
121 118
122 return 0; 119 return 0;
123 } 120 }
OLDNEW
« no previous file with comments | « ui/aura/client/stacking_client.h ('k') | ui/aura/root_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698