OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/views/widget/native_widget_aura.h" | 5 #include "ui/views/widget/native_widget_aura.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
9 #include "third_party/skia/include/core/SkRegion.h" | 9 #include "third_party/skia/include/core/SkRegion.h" |
10 #include "ui/aura/client/activation_client.h" | 10 #include "ui/aura/client/activation_client.h" |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
277 void* NativeWidgetAura::GetNativeWindowProperty(const char* name) const { | 277 void* NativeWidgetAura::GetNativeWindowProperty(const char* name) const { |
278 return window_ ? window_->GetNativeWindowProperty(name) : NULL; | 278 return window_ ? window_->GetNativeWindowProperty(name) : NULL; |
279 } | 279 } |
280 | 280 |
281 TooltipManager* NativeWidgetAura::GetTooltipManager() const { | 281 TooltipManager* NativeWidgetAura::GetTooltipManager() const { |
282 return tooltip_manager_.get(); | 282 return tooltip_manager_.get(); |
283 } | 283 } |
284 | 284 |
285 bool NativeWidgetAura::IsScreenReaderActive() const { | 285 bool NativeWidgetAura::IsScreenReaderActive() const { |
286 // http://crbug.com/102570 | 286 // http://crbug.com/102570 |
287 //NOTIMPLEMENTED(); | 287 // NOTIMPLEMENTED(); |
rjkroege
2012/04/02 17:05:15
leave it as it was?
| |
288 return false; | 288 return false; |
289 } | 289 } |
290 | 290 |
291 void NativeWidgetAura::SendNativeAccessibilityEvent( | 291 void NativeWidgetAura::SendNativeAccessibilityEvent( |
292 View* view, | 292 View* view, |
293 ui::AccessibilityTypes::Event event_type) { | 293 ui::AccessibilityTypes::Event event_type) { |
294 // http://crbug.com/102570 | 294 // http://crbug.com/102570 |
295 //NOTIMPLEMENTED(); | 295 // NOTIMPLEMENTED(); |
296 } | 296 } |
297 | 297 |
298 void NativeWidgetAura::SetMouseCapture() { | 298 void NativeWidgetAura::SetMouseCapture() { |
299 window_->SetCapture(); | 299 window_->SetCapture(); |
300 } | 300 } |
301 | 301 |
302 void NativeWidgetAura::ReleaseMouseCapture() { | 302 void NativeWidgetAura::ReleaseMouseCapture() { |
303 window_->ReleaseCapture(); | 303 window_->ReleaseCapture(); |
304 } | 304 } |
305 | 305 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
361 window_->set_title(title); | 361 window_->set_title(title); |
362 } | 362 } |
363 | 363 |
364 void NativeWidgetAura::SetWindowIcons(const SkBitmap& window_icon, | 364 void NativeWidgetAura::SetWindowIcons(const SkBitmap& window_icon, |
365 const SkBitmap& app_icon) { | 365 const SkBitmap& app_icon) { |
366 // Aura doesn't have window icons. | 366 // Aura doesn't have window icons. |
367 } | 367 } |
368 | 368 |
369 void NativeWidgetAura::SetAccessibleName(const string16& name) { | 369 void NativeWidgetAura::SetAccessibleName(const string16& name) { |
370 // http://crbug.com/102570 | 370 // http://crbug.com/102570 |
371 //NOTIMPLEMENTED(); | 371 // NOTIMPLEMENTED(); |
372 } | 372 } |
373 | 373 |
374 void NativeWidgetAura::SetAccessibleRole(ui::AccessibilityTypes::Role role) { | 374 void NativeWidgetAura::SetAccessibleRole(ui::AccessibilityTypes::Role role) { |
375 // http://crbug.com/102570 | 375 // http://crbug.com/102570 |
376 //NOTIMPLEMENTED(); | 376 // NOTIMPLEMENTED(); |
377 } | 377 } |
378 | 378 |
379 void NativeWidgetAura::SetAccessibleState(ui::AccessibilityTypes::State state) { | 379 void NativeWidgetAura::SetAccessibleState(ui::AccessibilityTypes::State state) { |
380 // http://crbug.com/102570 | 380 // http://crbug.com/102570 |
381 //NOTIMPLEMENTED(); | 381 // NOTIMPLEMENTED(); |
382 } | 382 } |
383 | 383 |
384 void NativeWidgetAura::InitModalType(ui::ModalType modal_type) { | 384 void NativeWidgetAura::InitModalType(ui::ModalType modal_type) { |
385 if (modal_type != ui::MODAL_TYPE_NONE) | 385 if (modal_type != ui::MODAL_TYPE_NONE) |
386 window_->SetProperty(aura::client::kModalKey, modal_type); | 386 window_->SetProperty(aura::client::kModalKey, modal_type); |
387 } | 387 } |
388 | 388 |
389 gfx::Rect NativeWidgetAura::GetWindowScreenBounds() const { | 389 gfx::Rect NativeWidgetAura::GetWindowScreenBounds() const { |
390 return window_->GetScreenBounds(); | 390 return window_->GetScreenBounds(); |
391 } | 391 } |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
559 void NativeWidgetAura::SetOpacity(unsigned char opacity) { | 559 void NativeWidgetAura::SetOpacity(unsigned char opacity) { |
560 window_->layer()->SetOpacity(opacity / 255.0); | 560 window_->layer()->SetOpacity(opacity / 255.0); |
561 } | 561 } |
562 | 562 |
563 void NativeWidgetAura::SetUseDragFrame(bool use_drag_frame) { | 563 void NativeWidgetAura::SetUseDragFrame(bool use_drag_frame) { |
564 NOTIMPLEMENTED(); | 564 NOTIMPLEMENTED(); |
565 } | 565 } |
566 | 566 |
567 bool NativeWidgetAura::IsAccessibleWidget() const { | 567 bool NativeWidgetAura::IsAccessibleWidget() const { |
568 // http://crbug.com/102570 | 568 // http://crbug.com/102570 |
569 //NOTIMPLEMENTED(); | 569 // NOTIMPLEMENTED(); |
570 return false; | 570 return false; |
571 } | 571 } |
572 | 572 |
573 void NativeWidgetAura::RunShellDrag(View* view, | 573 void NativeWidgetAura::RunShellDrag(View* view, |
574 const ui::OSExchangeData& data, | 574 const ui::OSExchangeData& data, |
575 const gfx::Point& location, | 575 const gfx::Point& location, |
576 int operation) { | 576 int operation) { |
577 gfx::Point root_location(location); | 577 gfx::Point root_location(location); |
578 aura::RootWindow* root_window = window_->GetRootWindow(); | 578 aura::RootWindow* root_window = window_->GetRootWindow(); |
579 aura::Window::ConvertPointToWindow(window_, root_window, &root_location); | 579 aura::Window::ConvertPointToWindow(window_, root_window, &root_location); |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
703 gfx::NativeCursor NativeWidgetAura::GetCursor(const gfx::Point& point) { | 703 gfx::NativeCursor NativeWidgetAura::GetCursor(const gfx::Point& point) { |
704 return cursor_; | 704 return cursor_; |
705 } | 705 } |
706 | 706 |
707 int NativeWidgetAura::GetNonClientComponent(const gfx::Point& point) const { | 707 int NativeWidgetAura::GetNonClientComponent(const gfx::Point& point) const { |
708 return delegate_->GetNonClientComponent(point); | 708 return delegate_->GetNonClientComponent(point); |
709 } | 709 } |
710 | 710 |
711 bool NativeWidgetAura::OnMouseEvent(aura::MouseEvent* event) { | 711 bool NativeWidgetAura::OnMouseEvent(aura::MouseEvent* event) { |
712 DCHECK(window_->IsVisible()); | 712 DCHECK(window_->IsVisible()); |
713 | |
713 if (event->type() == ui::ET_MOUSEWHEEL) { | 714 if (event->type() == ui::ET_MOUSEWHEEL) { |
714 MouseWheelEvent wheel_event(event); | 715 MouseWheelEvent wheel_event(event); |
715 return delegate_->OnMouseEvent(wheel_event); | 716 return delegate_->OnMouseEvent(wheel_event); |
716 } | 717 } |
717 if (event->type() == ui::ET_SCROLL) { | 718 if (event->type() == ui::ET_SCROLL) { |
718 ScrollEvent scroll_event(static_cast<aura::ScrollEvent*>(event)); | 719 ScrollEvent scroll_event(static_cast<aura::ScrollEvent*>(event)); |
719 return delegate_->OnMouseEvent(scroll_event); | 720 return delegate_->OnMouseEvent(scroll_event); |
720 } | 721 } |
721 MouseEvent mouse_event(event); | 722 MouseEvent mouse_event(event); |
722 if (tooltip_manager_.get()) | 723 if (tooltip_manager_.get()) |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
920 } | 921 } |
921 } | 922 } |
922 | 923 |
923 // static | 924 // static |
924 bool NativeWidgetPrivate::IsMouseButtonDown() { | 925 bool NativeWidgetPrivate::IsMouseButtonDown() { |
925 return aura::Env::GetInstance()->is_mouse_button_down(); | 926 return aura::Env::GetInstance()->is_mouse_button_down(); |
926 } | 927 } |
927 | 928 |
928 } // namespace internal | 929 } // namespace internal |
929 } // namespace views | 930 } // namespace views |
OLD | NEW |