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

Side by Side Diff: views/widget/native_widget_view.cc

Issue 7129022: Move last of event handlers down to NativeWidgetWin/Gtk. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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 "views/widget/native_widget_view.h" 5 #include "views/widget/native_widget_view.h"
6 6
7 #include "ui/gfx/canvas.h" 7 #include "ui/gfx/canvas.h"
8 8
9 namespace views { 9 namespace views {
10 namespace internal { 10 namespace internal {
(...skipping 14 matching lines...) Expand all
25 Widget* NativeWidgetView::GetAssociatedWidget() { 25 Widget* NativeWidgetView::GetAssociatedWidget() {
26 return native_widget_->delegate()->AsWidget(); 26 return native_widget_->delegate()->AsWidget();
27 } 27 }
28 28
29 //////////////////////////////////////////////////////////////////////////////// 29 ////////////////////////////////////////////////////////////////////////////////
30 // NativeWidgetView, View overrides: 30 // NativeWidgetView, View overrides:
31 31
32 void NativeWidgetView::ViewHierarchyChanged(bool is_add, View* parent, 32 void NativeWidgetView::ViewHierarchyChanged(bool is_add, View* parent,
33 View* child) { 33 View* child) {
34 if (is_add && child == this) 34 if (is_add && child == this)
35 delegate()->OnNativeWidgetCreated(); 35 delegate()->OnNativeWidgetCreated(gfx::Rect()); // TODO(beng):
36 } 36 }
37 37
38 void NativeWidgetView::OnBoundsChanged(const gfx::Rect& previous_bounds) { 38 void NativeWidgetView::OnBoundsChanged(const gfx::Rect& previous_bounds) {
39 delegate()->OnNativeWidgetSizeChanged(size()); 39 delegate()->OnNativeWidgetSizeChanged(size());
40 } 40 }
41 41
42 void NativeWidgetView::OnPaint(gfx::Canvas* canvas) { 42 void NativeWidgetView::OnPaint(gfx::Canvas* canvas) {
43 canvas->FillRectInt(SK_ColorRED, 0, 0, width(), height()); 43 canvas->FillRectInt(SK_ColorRED, 0, 0, width(), height());
44 delegate()->OnNativeWidgetPaint(canvas); 44 delegate()->OnNativeWidgetPaint(canvas);
45 } 45 }
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 } 111 }
112 112
113 std::string NativeWidgetView::GetClassName() const { 113 std::string NativeWidgetView::GetClassName() const {
114 return kViewClassName; 114 return kViewClassName;
115 } 115 }
116 116
117 117
118 } // namespace internal 118 } // namespace internal
119 } // namespace views 119 } // namespace views
120 120
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698