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

Side by Side Diff: chrome/browser/ui/views/aura/aura_init.cc

Issue 8122013: Allow CanvasSkia to bind to an existing SkCanvas. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: 1 more fix Created 9 years, 2 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
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 "chrome/browser/ui/views/aura/aura_init.h" 5 #include "chrome/browser/ui/views/aura/aura_init.h"
6 6
7 #include "chrome/browser/ui/views/chrome_views_delegate.h" 7 #include "chrome/browser/ui/views/chrome_views_delegate.h"
8 #include "ui/aura/desktop.h" 8 #include "ui/aura/desktop.h"
9 #include "ui/aura/hit_test.h" 9 #include "ui/aura/hit_test.h"
10 #include "ui/aura/window_delegate.h" 10 #include "ui/aura/window_delegate.h"
(...skipping 30 matching lines...) Expand all
41 virtual bool ShouldActivate(aura::MouseEvent* event) OVERRIDE { 41 virtual bool ShouldActivate(aura::MouseEvent* event) OVERRIDE {
42 return true; 42 return true;
43 } 43 }
44 virtual void OnActivated() OVERRIDE { 44 virtual void OnActivated() OVERRIDE {
45 } 45 }
46 virtual void OnLostActive() OVERRIDE { 46 virtual void OnLostActive() OVERRIDE {
47 } 47 }
48 virtual void OnCaptureLost() OVERRIDE { 48 virtual void OnCaptureLost() OVERRIDE {
49 } 49 }
50 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE { 50 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE {
51 canvas->AsCanvasSkia()->drawColor(color_, SkXfermode::kSrc_Mode); 51 canvas->GetSkCanvas()->drawColor(color_, SkXfermode::kSrc_Mode);
52 } 52 }
53 virtual void OnWindowDestroying() OVERRIDE { 53 virtual void OnWindowDestroying() OVERRIDE {
54 } 54 }
55 virtual void OnWindowDestroyed() OVERRIDE { 55 virtual void OnWindowDestroyed() OVERRIDE {
56 delete this; 56 delete this;
57 } 57 }
58 58
59 private: 59 private:
60 SkColor color_; 60 SkColor color_;
61 61
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 DemoWindowDelegate* window_delegate1 = new DemoWindowDelegate(SK_ColorBLUE); 102 DemoWindowDelegate* window_delegate1 = new DemoWindowDelegate(SK_ColorBLUE);
103 aura::Window* window1 = new aura::Window(window_delegate1); 103 aura::Window* window1 = new aura::Window(window_delegate1);
104 window1->set_id(1); 104 window1->set_id(1);
105 window1->Init(); 105 window1->Init();
106 window1->SetBounds(gfx::Rect(100, 100, 400, 400)); 106 window1->SetBounds(gfx::Rect(100, 100, 400, 400));
107 window1->Show(); 107 window1->Show();
108 window1->SetParent(NULL); 108 window1->SetParent(NULL);
109 } 109 }
110 110
111 } // namespace browser 111 } // namespace browser
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698