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

Side by Side Diff: services/ui/ws/window_tree.cc

Issue 2523723002: Update display::Display::kInvalidDisplayID constant. (Closed)
Patch Set: Fix includes. Created 4 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
« no previous file with comments | « services/ui/ws/user_display_manager.cc ('k') | ui/display/display.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "services/ui/ws/window_tree.h" 5 #include "services/ui/ws/window_tree.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 10 matching lines...) Expand all
21 #include "services/ui/ws/platform_display.h" 21 #include "services/ui/ws/platform_display.h"
22 #include "services/ui/ws/server_window.h" 22 #include "services/ui/ws/server_window.h"
23 #include "services/ui/ws/server_window_compositor_frame_sink_manager.h" 23 #include "services/ui/ws/server_window_compositor_frame_sink_manager.h"
24 #include "services/ui/ws/server_window_observer.h" 24 #include "services/ui/ws/server_window_observer.h"
25 #include "services/ui/ws/user_display_manager.h" 25 #include "services/ui/ws/user_display_manager.h"
26 #include "services/ui/ws/window_manager_display_root.h" 26 #include "services/ui/ws/window_manager_display_root.h"
27 #include "services/ui/ws/window_manager_state.h" 27 #include "services/ui/ws/window_manager_state.h"
28 #include "services/ui/ws/window_server.h" 28 #include "services/ui/ws/window_server.h"
29 #include "services/ui/ws/window_tree_binding.h" 29 #include "services/ui/ws/window_tree_binding.h"
30 #include "ui/display/display.h" 30 #include "ui/display/display.h"
31 #include "ui/display/types/display_constants.h"
31 #include "ui/platform_window/mojo/ime_type_converters.h" 32 #include "ui/platform_window/mojo/ime_type_converters.h"
32 #include "ui/platform_window/text_input_state.h" 33 #include "ui/platform_window/text_input_state.h"
33 34
34 using mojo::InterfaceRequest; 35 using mojo::InterfaceRequest;
35 36
36 namespace ui { 37 namespace ui {
37 namespace ws { 38 namespace ws {
38 39
39 class TargetedEvent : public ServerWindowObserver { 40 class TargetedEvent : public ServerWindowObserver {
40 public: 41 public:
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 98
98 if (roots_.empty()) 99 if (roots_.empty())
99 return; 100 return;
100 101
101 std::vector<const ServerWindow*> to_send; 102 std::vector<const ServerWindow*> to_send;
102 CHECK_EQ(1u, roots_.size()); 103 CHECK_EQ(1u, roots_.size());
103 const ServerWindow* root = *roots_.begin(); 104 const ServerWindow* root = *roots_.begin();
104 GetUnknownWindowsFrom(root, &to_send); 105 GetUnknownWindowsFrom(root, &to_send);
105 106
106 Display* display = GetDisplay(root); 107 Display* display = GetDisplay(root);
107 int64_t display_id = 108 int64_t display_id = display ? display->GetId() : display::kInvalidDisplayId;
108 display ? display->GetId() : display::Display::kInvalidDisplayID;
109 const ServerWindow* focused_window = 109 const ServerWindow* focused_window =
110 display ? display->GetFocusedWindow() : nullptr; 110 display ? display->GetFocusedWindow() : nullptr;
111 if (focused_window) 111 if (focused_window)
112 focused_window = access_policy_->GetWindowForFocusChange(focused_window); 112 focused_window = access_policy_->GetWindowForFocusChange(focused_window);
113 ClientWindowId focused_window_id; 113 ClientWindowId focused_window_id;
114 if (focused_window) 114 if (focused_window)
115 IsWindowKnown(focused_window, &focused_window_id); 115 IsWindowKnown(focused_window, &focused_window_id);
116 116
117 const bool drawn = root->parent() && root->parent()->IsDrawn(); 117 const bool drawn = root->parent() && root->parent()->IsDrawn();
118 client()->OnEmbed(id_, WindowToWindowData(to_send.front()), std::move(tree), 118 client()->OnEmbed(id_, WindowToWindowData(to_send.front()), std::move(tree),
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 binding_->SetIncomingMethodCallProcessingPaused(false); 462 binding_->SetIncomingMethodCallProcessingPaused(false);
463 // We were paused, so the id should still be valid. 463 // We were paused, so the id should still be valid.
464 DCHECK(IsValidIdForNewWindow( 464 DCHECK(IsValidIdForNewWindow(
465 waiting_for_top_level_window_info->client_window_id)); 465 waiting_for_top_level_window_info->client_window_id));
466 client_id_to_window_id_map_[waiting_for_top_level_window_info 466 client_id_to_window_id_map_[waiting_for_top_level_window_info
467 ->client_window_id] = window->id(); 467 ->client_window_id] = window->id();
468 window_id_to_client_id_map_[window->id()] = 468 window_id_to_client_id_map_[window->id()] =
469 waiting_for_top_level_window_info->client_window_id; 469 waiting_for_top_level_window_info->client_window_id;
470 roots_.insert(window); 470 roots_.insert(window);
471 Display* display = GetDisplay(window); 471 Display* display = GetDisplay(window);
472 int64_t display_id = 472 int64_t display_id = display ? display->GetId() : display::kInvalidDisplayId;
473 display ? display->GetId() : display::Display::kInvalidDisplayID;
474 const bool drawn = window->parent() && window->parent()->IsDrawn(); 473 const bool drawn = window->parent() && window->parent()->IsDrawn();
475 client()->OnTopLevelCreated(client_change_id, WindowToWindowData(window), 474 client()->OnTopLevelCreated(client_change_id, WindowToWindowData(window),
476 display_id, drawn); 475 display_id, drawn);
477 } 476 }
478 477
479 void WindowTree::AddActivationParent(const ClientWindowId& window_id) { 478 void WindowTree::AddActivationParent(const ClientWindowId& window_id) {
480 ServerWindow* window = GetWindowByClientId(window_id); 479 ServerWindow* window = GetWindowByClientId(window_id);
481 if (window) { 480 if (window) {
482 Display* display = GetDisplay(window); 481 Display* display = GetDisplay(window);
483 if (display) 482 if (display)
(...skipping 1459 matching lines...) Expand 10 before | Expand all | Expand 10 after
1943 client()->OnCompleteDrop(client_window_id.id, event_flags, cursor_offset, 1942 client()->OnCompleteDrop(client_window_id.id, event_flags, cursor_offset,
1944 effect_bitmask, callback); 1943 effect_bitmask, callback);
1945 } 1944 }
1946 1945
1947 void WindowTree::PerformOnDragDropDone() { 1946 void WindowTree::PerformOnDragDropDone() {
1948 client()->OnDragDropDone(); 1947 client()->OnDragDropDone();
1949 } 1948 }
1950 1949
1951 } // namespace ws 1950 } // namespace ws
1952 } // namespace ui 1951 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/user_display_manager.cc ('k') | ui/display/display.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698