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

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

Issue 297123002: API proposal for chrome.app.window to intercept all keys. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Return if there is no windows with keyboard focus. Created 6 years, 4 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
OLDNEW
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/widget.h" 5 #include "ui/views/widget/widget.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 work_area.Inset(10, 10, 10, 10); 523 work_area.Inset(10, 10, 10, 10);
524 work_area.AdjustToFit(bounds); 524 work_area.AdjustToFit(bounds);
525 SetBounds(work_area); 525 SetBounds(work_area);
526 } 526 }
527 } 527 }
528 528
529 void Widget::SetVisibilityChangedAnimationsEnabled(bool value) { 529 void Widget::SetVisibilityChangedAnimationsEnabled(bool value) {
530 native_widget_->SetVisibilityChangedAnimationsEnabled(value); 530 native_widget_->SetVisibilityChangedAnimationsEnabled(value);
531 } 531 }
532 532
533 void Widget::SetInterceptAllKeys(bool want_all_keys) {
534 native_widget_->SetInterceptAllKeys(want_all_keys);
535 }
536
533 Widget::MoveLoopResult Widget::RunMoveLoop( 537 Widget::MoveLoopResult Widget::RunMoveLoop(
534 const gfx::Vector2d& drag_offset, 538 const gfx::Vector2d& drag_offset,
535 MoveLoopSource source, 539 MoveLoopSource source,
536 MoveLoopEscapeBehavior escape_behavior) { 540 MoveLoopEscapeBehavior escape_behavior) {
537 return native_widget_->RunMoveLoop(drag_offset, source, escape_behavior); 541 return native_widget_->RunMoveLoop(drag_offset, source, escape_behavior);
538 } 542 }
539 543
540 void Widget::EndMoveLoop() { 544 void Widget::EndMoveLoop() {
541 native_widget_->EndMoveLoop(); 545 native_widget_->EndMoveLoop();
542 } 546 }
(...skipping 968 matching lines...) Expand 10 before | Expand all | Expand 10 after
1511 1515
1512 //////////////////////////////////////////////////////////////////////////////// 1516 ////////////////////////////////////////////////////////////////////////////////
1513 // internal::NativeWidgetPrivate, NativeWidget implementation: 1517 // internal::NativeWidgetPrivate, NativeWidget implementation:
1514 1518
1515 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { 1519 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() {
1516 return this; 1520 return this;
1517 } 1521 }
1518 1522
1519 } // namespace internal 1523 } // namespace internal
1520 } // namespace views 1524 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698