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

Side by Side Diff: ui/views/widget/native_widget_aura.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/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/strings/string_util.h" 8 #include "base/strings/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/aura_constants.h" 10 #include "ui/aura/client/aura_constants.h"
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 525
526 bool NativeWidgetAura::IsActive() const { 526 bool NativeWidgetAura::IsActive() const {
527 return window_ && wm::IsActiveWindow(window_); 527 return window_ && wm::IsActiveWindow(window_);
528 } 528 }
529 529
530 void NativeWidgetAura::SetAlwaysOnTop(bool on_top) { 530 void NativeWidgetAura::SetAlwaysOnTop(bool on_top) {
531 if (window_) 531 if (window_)
532 window_->SetProperty(aura::client::kAlwaysOnTopKey, on_top); 532 window_->SetProperty(aura::client::kAlwaysOnTopKey, on_top);
533 } 533 }
534 534
535 void NativeWidgetAura::SetInterceptAllKeys(bool want_all_keys) {
536 // TODO(sriramsr): Should implement for ChromeOS.
537 }
538
535 bool NativeWidgetAura::IsAlwaysOnTop() const { 539 bool NativeWidgetAura::IsAlwaysOnTop() const {
536 return window_ && window_->GetProperty(aura::client::kAlwaysOnTopKey); 540 return window_ && window_->GetProperty(aura::client::kAlwaysOnTopKey);
537 } 541 }
538 542
539 void NativeWidgetAura::SetVisibleOnAllWorkspaces(bool always_visible) { 543 void NativeWidgetAura::SetVisibleOnAllWorkspaces(bool always_visible) {
540 // Not implemented on chromeos or for child widgets. 544 // Not implemented on chromeos or for child widgets.
541 } 545 }
542 546
543 void NativeWidgetAura::Maximize() { 547 void NativeWidgetAura::Maximize() {
544 if (window_) 548 if (window_)
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after
1155 l10n_util::AdjustUIFont(&(ncm.lfCaptionFont)); 1159 l10n_util::AdjustUIFont(&(ncm.lfCaptionFont));
1156 base::win::ScopedHFONT caption_font(CreateFontIndirect(&(ncm.lfCaptionFont))); 1160 base::win::ScopedHFONT caption_font(CreateFontIndirect(&(ncm.lfCaptionFont)));
1157 return gfx::FontList(gfx::Font(caption_font)); 1161 return gfx::FontList(gfx::Font(caption_font));
1158 #else 1162 #else
1159 return gfx::FontList(); 1163 return gfx::FontList();
1160 #endif 1164 #endif
1161 } 1165 }
1162 1166
1163 } // namespace internal 1167 } // namespace internal
1164 } // namespace views 1168 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698