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

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

Issue 8770011: aura: Ask the WindowDelegate before a Window is Focus()ed. (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
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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 } 46 }
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 ShouldActivate(aura::Event* event) OVERRIDE { return true; } 57 virtual bool ShouldActivate(aura::Event* event) OVERRIDE { return true; }
57 virtual void OnActivated() OVERRIDE {} 58 virtual void OnActivated() OVERRIDE {}
58 virtual void OnLostActive() OVERRIDE {} 59 virtual void OnLostActive() OVERRIDE {}
59 virtual void OnCaptureLost() OVERRIDE {} 60 virtual void OnCaptureLost() OVERRIDE {}
60 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE { 61 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE {
61 canvas->GetSkCanvas()->drawColor(color_, SkXfermode::kSrc_Mode); 62 canvas->GetSkCanvas()->drawColor(color_, SkXfermode::kSrc_Mode);
62 } 63 }
63 virtual void OnWindowDestroying() OVERRIDE {} 64 virtual void OnWindowDestroying() OVERRIDE {}
64 virtual void OnWindowDestroyed() OVERRIDE {} 65 virtual void OnWindowDestroyed() OVERRIDE {}
65 virtual void OnWindowVisibilityChanged(bool visible) OVERRIDE {} 66 virtual void OnWindowVisibilityChanged(bool visible) OVERRIDE {}
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 window3.SetBounds(gfx::Rect(10, 10, 50, 50)); 114 window3.SetBounds(gfx::Rect(10, 10, 50, 50));
114 window3.Show(); 115 window3.Show();
115 window3.SetParent(&window2); 116 window3.SetParent(&window2);
116 117
117 aura::Desktop::GetInstance()->Run(); 118 aura::Desktop::GetInstance()->Run();
118 119
119 ui::CompositorTestSupport::Terminate(); 120 ui::CompositorTestSupport::Terminate();
120 121
121 return 0; 122 return 0;
122 } 123 }
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