| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "ui/ozone/platform/caca/caca_window.h" | 5 #include "ui/ozone/platform/caca/caca_window.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 delegate_->OnBoundsChanged(gfx::Rect(bitmap_size_)); | 97 delegate_->OnBoundsChanged(gfx::Rect(bitmap_size_)); |
| 98 } | 98 } |
| 99 | 99 |
| 100 void CacaWindow::OnCacaQuit() { | 100 void CacaWindow::OnCacaQuit() { |
| 101 delegate_->OnCloseRequest(); | 101 delegate_->OnCloseRequest(); |
| 102 } | 102 } |
| 103 | 103 |
| 104 | 104 |
| 105 void CacaWindow::OnCacaEvent(ui::Event* event) { | 105 void CacaWindow::OnCacaEvent(ui::Event* event) { |
| 106 DispatchEventFromNativeUiEvent( | 106 DispatchEventFromNativeUiEvent( |
| 107 event, | 107 event, base::Bind(&PlatformWindowDelegate::DispatchEvent, |
| 108 base::Bind(&PlatformWindowDelegate::DispatchEvent, | 108 base::Unretained(delegate_))); |
| 109 base::Unretained(delegate_))); | |
| 110 } | 109 } |
| 111 | 110 |
| 112 gfx::Rect CacaWindow::GetBounds() { return gfx::Rect(bitmap_size_); } | 111 gfx::Rect CacaWindow::GetBounds() { return gfx::Rect(bitmap_size_); } |
| 113 | 112 |
| 114 void CacaWindow::SetBounds(const gfx::Rect& bounds) {} | 113 void CacaWindow::SetBounds(const gfx::Rect& bounds) {} |
| 115 | 114 |
| 116 void CacaWindow::Show() {} | 115 void CacaWindow::Show() {} |
| 117 | 116 |
| 118 void CacaWindow::Hide() {} | 117 void CacaWindow::Hide() {} |
| 119 | 118 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 137 | 136 |
| 138 bool CacaWindow::CanDispatchEvent(const PlatformEvent& event) { return true; } | 137 bool CacaWindow::CanDispatchEvent(const PlatformEvent& event) { return true; } |
| 139 | 138 |
| 140 uint32_t CacaWindow::DispatchEvent(const PlatformEvent& ne) { | 139 uint32_t CacaWindow::DispatchEvent(const PlatformEvent& ne) { |
| 141 // We don't dispatch events via PlatformEventSource. | 140 // We don't dispatch events via PlatformEventSource. |
| 142 NOTREACHED(); | 141 NOTREACHED(); |
| 143 return ui::POST_DISPATCH_STOP_PROPAGATION; | 142 return ui::POST_DISPATCH_STOP_PROPAGATION; |
| 144 } | 143 } |
| 145 | 144 |
| 146 } // namespace ui | 145 } // namespace ui |
| OLD | NEW |