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

Side by Side Diff: extensions/browser/app_window/app_window.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: Sync to TOT Created 6 years 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 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 "extensions/browser/app_window/app_window.h" 5 #include "extensions/browser/app_window/app_window.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after
704 // overlap the taskbar to be on top. The property will be applied when the 704 // overlap the taskbar to be on top. The property will be applied when the
705 // window exits fullscreen and moves away from the taskbar. 705 // window exits fullscreen and moves away from the taskbar.
706 if (!IsFullscreen() && !IntersectsWithTaskbar()) 706 if (!IsFullscreen() && !IntersectsWithTaskbar())
707 native_app_window_->SetAlwaysOnTop(always_on_top); 707 native_app_window_->SetAlwaysOnTop(always_on_top);
708 708
709 OnNativeWindowChanged(); 709 OnNativeWindowChanged();
710 } 710 }
711 711
712 bool AppWindow::IsAlwaysOnTop() const { return cached_always_on_top_; } 712 bool AppWindow::IsAlwaysOnTop() const { return cached_always_on_top_; }
713 713
714 void AppWindow::SetInterceptAllKeys(bool want_all_keys) {
715 native_app_window_->SetInterceptAllKeys(want_all_keys);
716 }
717
714 void AppWindow::WindowEventsReady() { 718 void AppWindow::WindowEventsReady() {
715 can_send_events_ = true; 719 can_send_events_ = true;
716 SendOnWindowShownIfShown(); 720 SendOnWindowShownIfShown();
717 } 721 }
718 722
719 void AppWindow::GetSerializedState(base::DictionaryValue* properties) const { 723 void AppWindow::GetSerializedState(base::DictionaryValue* properties) const {
720 DCHECK(properties); 724 DCHECK(properties);
721 725
722 properties->SetBoolean("fullscreen", 726 properties->SetBoolean("fullscreen",
723 native_app_window_->IsFullscreenOrPending()); 727 native_app_window_->IsFullscreenOrPending());
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
1091 region.bounds.x(), 1095 region.bounds.x(),
1092 region.bounds.y(), 1096 region.bounds.y(),
1093 region.bounds.right(), 1097 region.bounds.right(),
1094 region.bounds.bottom(), 1098 region.bounds.bottom(),
1095 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); 1099 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op);
1096 } 1100 }
1097 return sk_region; 1101 return sk_region;
1098 } 1102 }
1099 1103
1100 } // namespace extensions 1104 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/app_window/app_window.h ('k') | extensions/browser/app_window/native_app_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698