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

Unified Diff: ui/aura/remote_root_window_host_win.cc

Issue 126513004: Rename RootWindowHost to WindowTreeHost (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/aura/remote_root_window_host_win.h ('k') | ui/aura/root_window.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/remote_root_window_host_win.cc
diff --git a/ui/aura/remote_root_window_host_win.cc b/ui/aura/remote_root_window_host_win.cc
index 18296f5e178fe4659c40143a8e4852927722e42d..a91fed4a6a062461dd58fa5a2d07c81178ea0e8e 100644
--- a/ui/aura/remote_root_window_host_win.cc
+++ b/ui/aura/remote_root_window_host_win.cc
@@ -31,7 +31,7 @@ namespace aura {
namespace {
-const char* kRootWindowHostWinKey = "__AURA_REMOTE_ROOT_WINDOW_HOST_WIN__";
+const char* kWindowTreeHostWinKey = "__AURA_REMOTE_ROOT_WINDOW_HOST_WIN__";
// Sets the keystate for the virtual key passed in to down or up.
void SetKeyState(uint8* key_states, bool key_down, uint32 virtual_key_code) {
@@ -87,8 +87,8 @@ void HandleOpenFile(const base::string16& title,
const base::string16& filter,
const OpenFileCompletion& on_success,
const FileSelectionCanceled& on_failure) {
- DCHECK(aura::RemoteRootWindowHostWin::Instance());
- aura::RemoteRootWindowHostWin::Instance()->HandleOpenFile(title,
+ DCHECK(aura::RemoteWindowTreeHostWin::Instance());
+ aura::RemoteWindowTreeHostWin::Instance()->HandleOpenFile(title,
default_path,
filter,
on_success,
@@ -100,8 +100,8 @@ void HandleOpenMultipleFiles(const base::string16& title,
const base::string16& filter,
const OpenMultipleFilesCompletion& on_success,
const FileSelectionCanceled& on_failure) {
- DCHECK(aura::RemoteRootWindowHostWin::Instance());
- aura::RemoteRootWindowHostWin::Instance()->HandleOpenMultipleFiles(
+ DCHECK(aura::RemoteWindowTreeHostWin::Instance());
+ aura::RemoteWindowTreeHostWin::Instance()->HandleOpenMultipleFiles(
title,
default_path,
filter,
@@ -116,8 +116,8 @@ void HandleSaveFile(const base::string16& title,
const base::string16& default_extension,
const SaveFileCompletion& on_success,
const FileSelectionCanceled& on_failure) {
- DCHECK(aura::RemoteRootWindowHostWin::Instance());
- aura::RemoteRootWindowHostWin::Instance()->HandleSaveFile(title,
+ DCHECK(aura::RemoteWindowTreeHostWin::Instance());
+ aura::RemoteWindowTreeHostWin::Instance()->HandleSaveFile(title,
default_path,
filter,
filter_index,
@@ -129,48 +129,48 @@ void HandleSaveFile(const base::string16& title,
void HandleSelectFolder(const base::string16& title,
const SelectFolderCompletion& on_success,
const FileSelectionCanceled& on_failure) {
- DCHECK(aura::RemoteRootWindowHostWin::Instance());
- aura::RemoteRootWindowHostWin::Instance()->HandleSelectFolder(title,
+ DCHECK(aura::RemoteWindowTreeHostWin::Instance());
+ aura::RemoteWindowTreeHostWin::Instance()->HandleSelectFolder(title,
on_success,
on_failure);
}
void HandleActivateDesktop(const base::FilePath& shortcut,
bool ash_exit) {
- DCHECK(aura::RemoteRootWindowHostWin::Instance());
- aura::RemoteRootWindowHostWin::Instance()->HandleActivateDesktop(shortcut,
+ DCHECK(aura::RemoteWindowTreeHostWin::Instance());
+ aura::RemoteWindowTreeHostWin::Instance()->HandleActivateDesktop(shortcut,
ash_exit);
}
-RemoteRootWindowHostWin* g_instance = NULL;
+RemoteWindowTreeHostWin* g_instance = NULL;
-RemoteRootWindowHostWin* RemoteRootWindowHostWin::Instance() {
+RemoteWindowTreeHostWin* RemoteWindowTreeHostWin::Instance() {
if (g_instance)
return g_instance;
return Create(gfx::Rect());
}
-RemoteRootWindowHostWin* RemoteRootWindowHostWin::Create(
+RemoteWindowTreeHostWin* RemoteWindowTreeHostWin::Create(
const gfx::Rect& bounds) {
- g_instance = g_instance ? g_instance : new RemoteRootWindowHostWin(bounds);
+ g_instance = g_instance ? g_instance : new RemoteWindowTreeHostWin(bounds);
return g_instance;
}
-RemoteRootWindowHostWin::RemoteRootWindowHostWin(const gfx::Rect& bounds)
+RemoteWindowTreeHostWin::RemoteWindowTreeHostWin(const gfx::Rect& bounds)
: remote_window_(NULL),
host_(NULL),
ignore_mouse_moves_until_set_cursor_ack_(false),
event_flags_(0),
- window_size_(aura::RootWindowHost::GetNativeScreenSize()) {
- prop_.reset(new ui::ViewProp(NULL, kRootWindowHostWinKey, this));
+ window_size_(aura::WindowTreeHost::GetNativeScreenSize()) {
+ prop_.reset(new ui::ViewProp(NULL, kWindowTreeHostWinKey, this));
CreateCompositor(GetAcceleratedWidget());
}
-RemoteRootWindowHostWin::~RemoteRootWindowHostWin() {
+RemoteWindowTreeHostWin::~RemoteWindowTreeHostWin() {
g_instance = NULL;
}
-void RemoteRootWindowHostWin::Connected(IPC::Sender* host, HWND remote_window) {
+void RemoteWindowTreeHostWin::Connected(IPC::Sender* host, HWND remote_window) {
CHECK(host_ == NULL);
host_ = host;
remote_window_ = remote_window;
@@ -180,7 +180,7 @@ void RemoteRootWindowHostWin::Connected(IPC::Sender* host, HWND remote_window) {
InitCompositor();
}
-void RemoteRootWindowHostWin::Disconnected() {
+void RemoteWindowTreeHostWin::Disconnected() {
// Don't CHECK here, Disconnected is called on a channel error which can
// happen before we're successfully Connected.
if (!host_)
@@ -193,9 +193,9 @@ void RemoteRootWindowHostWin::Disconnected() {
remote_window_ = NULL;
}
-bool RemoteRootWindowHostWin::OnMessageReceived(const IPC::Message& message) {
+bool RemoteWindowTreeHostWin::OnMessageReceived(const IPC::Message& message) {
bool handled = true;
- IPC_BEGIN_MESSAGE_MAP(RemoteRootWindowHostWin, message)
+ IPC_BEGIN_MESSAGE_MAP(RemoteWindowTreeHostWin, message)
IPC_MESSAGE_HANDLER(MetroViewerHostMsg_MouseMoved, OnMouseMoved)
IPC_MESSAGE_HANDLER(MetroViewerHostMsg_MouseButton, OnMouseButton)
IPC_MESSAGE_HANDLER(MetroViewerHostMsg_KeyDown, OnKeyDown)
@@ -232,7 +232,7 @@ bool RemoteRootWindowHostWin::OnMessageReceived(const IPC::Message& message) {
return handled;
}
-void RemoteRootWindowHostWin::HandleOpenURLOnDesktop(
+void RemoteWindowTreeHostWin::HandleOpenURLOnDesktop(
const base::FilePath& shortcut,
const base::string16& url) {
if (!host_)
@@ -240,7 +240,7 @@ void RemoteRootWindowHostWin::HandleOpenURLOnDesktop(
host_->Send(new MetroViewerHostMsg_OpenURLOnDesktop(shortcut, url));
}
-void RemoteRootWindowHostWin::HandleActivateDesktop(
+void RemoteWindowTreeHostWin::HandleActivateDesktop(
const base::FilePath& shortcut,
bool ash_exit) {
if (!host_)
@@ -248,7 +248,7 @@ void RemoteRootWindowHostWin::HandleActivateDesktop(
host_->Send(new MetroViewerHostMsg_ActivateDesktop(shortcut, ash_exit));
}
-void RemoteRootWindowHostWin::HandleOpenFile(
+void RemoteWindowTreeHostWin::HandleOpenFile(
const base::string16& title,
const base::FilePath& default_path,
const base::string16& filter,
@@ -270,7 +270,7 @@ void RemoteRootWindowHostWin::HandleOpenFile(
false));
}
-void RemoteRootWindowHostWin::HandleOpenMultipleFiles(
+void RemoteWindowTreeHostWin::HandleOpenMultipleFiles(
const base::string16& title,
const base::FilePath& default_path,
const base::string16& filter,
@@ -291,7 +291,7 @@ void RemoteRootWindowHostWin::HandleOpenMultipleFiles(
true));
}
-void RemoteRootWindowHostWin::HandleSaveFile(
+void RemoteWindowTreeHostWin::HandleSaveFile(
const base::string16& title,
const base::FilePath& default_path,
const base::string16& filter,
@@ -318,7 +318,7 @@ void RemoteRootWindowHostWin::HandleSaveFile(
host_->Send(new MetroViewerHostMsg_DisplayFileSaveAs(params));
}
-void RemoteRootWindowHostWin::HandleSelectFolder(
+void RemoteWindowTreeHostWin::HandleSelectFolder(
const base::string16& title,
const SelectFolderCompletion& on_success,
const FileSelectionCanceled& on_failure) {
@@ -334,78 +334,78 @@ void RemoteRootWindowHostWin::HandleSelectFolder(
host_->Send(new MetroViewerHostMsg_DisplaySelectFolder(title));
}
-void RemoteRootWindowHostWin::HandleWindowSizeChanged(uint32 width,
+void RemoteWindowTreeHostWin::HandleWindowSizeChanged(uint32 width,
uint32 height) {
SetBounds(gfx::Rect(0, 0, width, height));
}
-bool RemoteRootWindowHostWin::IsForegroundWindow() {
+bool RemoteWindowTreeHostWin::IsForegroundWindow() {
return ::GetForegroundWindow() == remote_window_;
}
-Window* RemoteRootWindowHostWin::GetAshWindow() {
+Window* RemoteWindowTreeHostWin::GetAshWindow() {
return GetRootWindow()->window();
}
-RootWindow* RemoteRootWindowHostWin::GetRootWindow() {
+RootWindow* RemoteWindowTreeHostWin::GetRootWindow() {
return delegate_->AsRootWindow();
}
-gfx::AcceleratedWidget RemoteRootWindowHostWin::GetAcceleratedWidget() {
+gfx::AcceleratedWidget RemoteWindowTreeHostWin::GetAcceleratedWidget() {
if (remote_window_)
return remote_window_;
// Getting here should only happen for ash_unittests.exe and related code.
return ::GetDesktopWindow();
}
-void RemoteRootWindowHostWin::Show() {
+void RemoteWindowTreeHostWin::Show() {
ui::RemoteInputMethodPrivateWin* remote_input_method_private =
GetRemoteInputMethodPrivate();
if (remote_input_method_private)
remote_input_method_private->SetRemoteDelegate(this);
}
-void RemoteRootWindowHostWin::Hide() {
+void RemoteWindowTreeHostWin::Hide() {
NOTIMPLEMENTED();
}
-void RemoteRootWindowHostWin::ToggleFullScreen() {
+void RemoteWindowTreeHostWin::ToggleFullScreen() {
}
-gfx::Rect RemoteRootWindowHostWin::GetBounds() const {
+gfx::Rect RemoteWindowTreeHostWin::GetBounds() const {
return gfx::Rect(window_size_);
}
-void RemoteRootWindowHostWin::SetBounds(const gfx::Rect& bounds) {
+void RemoteWindowTreeHostWin::SetBounds(const gfx::Rect& bounds) {
window_size_ = bounds.size();
NotifyHostResized(bounds.size());
}
-gfx::Insets RemoteRootWindowHostWin::GetInsets() const {
+gfx::Insets RemoteWindowTreeHostWin::GetInsets() const {
return gfx::Insets();
}
-void RemoteRootWindowHostWin::SetInsets(const gfx::Insets& insets) {
+void RemoteWindowTreeHostWin::SetInsets(const gfx::Insets& insets) {
}
-gfx::Point RemoteRootWindowHostWin::GetLocationOnNativeScreen() const {
+gfx::Point RemoteWindowTreeHostWin::GetLocationOnNativeScreen() const {
return gfx::Point(0, 0);
}
-void RemoteRootWindowHostWin::SetCursor(gfx::NativeCursor native_cursor) {
+void RemoteWindowTreeHostWin::SetCursor(gfx::NativeCursor native_cursor) {
if (!host_)
return;
host_->Send(
new MetroViewerHostMsg_SetCursor(uint64(native_cursor.platform())));
}
-void RemoteRootWindowHostWin::SetCapture() {
+void RemoteWindowTreeHostWin::SetCapture() {
}
-void RemoteRootWindowHostWin::ReleaseCapture() {
+void RemoteWindowTreeHostWin::ReleaseCapture() {
}
-bool RemoteRootWindowHostWin::QueryMouseLocation(gfx::Point* location_return) {
+bool RemoteWindowTreeHostWin::QueryMouseLocation(gfx::Point* location_return) {
aura::client::CursorClient* cursor_client =
aura::client::GetCursorClient(GetRootWindow()->window());
if (cursor_client && !cursor_client->IsMouseEventsEnabled()) {
@@ -419,18 +419,18 @@ bool RemoteRootWindowHostWin::QueryMouseLocation(gfx::Point* location_return) {
return true;
}
-bool RemoteRootWindowHostWin::ConfineCursorToRootWindow() {
+bool RemoteWindowTreeHostWin::ConfineCursorToRootWindow() {
return true;
}
-void RemoteRootWindowHostWin::UnConfineCursor() {
+void RemoteWindowTreeHostWin::UnConfineCursor() {
}
-void RemoteRootWindowHostWin::OnCursorVisibilityChanged(bool show) {
+void RemoteWindowTreeHostWin::OnCursorVisibilityChanged(bool show) {
NOTIMPLEMENTED();
}
-void RemoteRootWindowHostWin::MoveCursorTo(const gfx::Point& location) {
+void RemoteWindowTreeHostWin::MoveCursorTo(const gfx::Point& location) {
VLOG(1) << "In MoveCursorTo: " << location.x() << ", " << location.y();
if (!host_)
return;
@@ -455,23 +455,23 @@ void RemoteRootWindowHostWin::MoveCursorTo(const gfx::Point& location) {
host_->Send(new MetroViewerHostMsg_SetCursorPos(location.x(), location.y()));
}
-void RemoteRootWindowHostWin::PostNativeEvent(
+void RemoteWindowTreeHostWin::PostNativeEvent(
const base::NativeEvent& native_event) {
}
-void RemoteRootWindowHostWin::OnDeviceScaleFactorChanged(
+void RemoteWindowTreeHostWin::OnDeviceScaleFactorChanged(
float device_scale_factor) {
NOTIMPLEMENTED();
}
-void RemoteRootWindowHostWin::PrepareForShutdown() {
+void RemoteWindowTreeHostWin::PrepareForShutdown() {
}
-void RemoteRootWindowHostWin::CancelComposition() {
+void RemoteWindowTreeHostWin::CancelComposition() {
host_->Send(new MetroViewerHostMsg_ImeCancelComposition);
}
-void RemoteRootWindowHostWin::OnTextInputClientUpdated(
+void RemoteWindowTreeHostWin::OnTextInputClientUpdated(
const std::vector<int32>& input_scopes,
const std::vector<gfx::Rect>& composition_character_bounds) {
std::vector<metro_viewer::CharacterBounds> character_bounds;
@@ -494,7 +494,7 @@ gfx::Point PointFromNativeEvent(int32 x, int32 y) {
return result;
}
-void RemoteRootWindowHostWin::OnMouseMoved(int32 x, int32 y, int32 flags) {
+void RemoteWindowTreeHostWin::OnMouseMoved(int32 x, int32 y, int32 flags) {
if (ignore_mouse_moves_until_set_cursor_ack_)
return;
@@ -503,7 +503,7 @@ void RemoteRootWindowHostWin::OnMouseMoved(int32 x, int32 y, int32 flags) {
delegate_->OnHostMouseEvent(&event);
}
-void RemoteRootWindowHostWin::OnMouseButton(
+void RemoteWindowTreeHostWin::OnMouseButton(
const MetroViewerHostMsg_MouseButtonParams& params) {
gfx::Point location = PointFromNativeEvent(params.x, params.y);
ui::MouseEvent mouse_event(params.event_type, location, location,
@@ -535,7 +535,7 @@ void RemoteRootWindowHostWin::OnMouseButton(
}
}
-void RemoteRootWindowHostWin::OnKeyDown(uint32 vkey,
+void RemoteWindowTreeHostWin::OnKeyDown(uint32 vkey,
uint32 repeat_count,
uint32 scan_code,
uint32 flags) {
@@ -543,7 +543,7 @@ void RemoteRootWindowHostWin::OnKeyDown(uint32 vkey,
flags, false);
}
-void RemoteRootWindowHostWin::OnKeyUp(uint32 vkey,
+void RemoteWindowTreeHostWin::OnKeyUp(uint32 vkey,
uint32 repeat_count,
uint32 scan_code,
uint32 flags) {
@@ -551,7 +551,7 @@ void RemoteRootWindowHostWin::OnKeyUp(uint32 vkey,
flags, false);
}
-void RemoteRootWindowHostWin::OnChar(uint32 key_code,
+void RemoteWindowTreeHostWin::OnChar(uint32 key_code,
uint32 repeat_count,
uint32 scan_code,
uint32 flags) {
@@ -559,11 +559,11 @@ void RemoteRootWindowHostWin::OnChar(uint32 key_code,
scan_code, flags, true);
}
-void RemoteRootWindowHostWin::OnWindowActivated() {
+void RemoteWindowTreeHostWin::OnWindowActivated() {
delegate_->OnHostActivated();
}
-void RemoteRootWindowHostWin::OnTouchDown(int32 x,
+void RemoteWindowTreeHostWin::OnTouchDown(int32 x,
int32 y,
uint64 timestamp,
uint32 pointer_id) {
@@ -575,7 +575,7 @@ void RemoteRootWindowHostWin::OnTouchDown(int32 x,
delegate_->OnHostTouchEvent(&event);
}
-void RemoteRootWindowHostWin::OnTouchUp(int32 x,
+void RemoteWindowTreeHostWin::OnTouchUp(int32 x,
int32 y,
uint64 timestamp,
uint32 pointer_id) {
@@ -587,7 +587,7 @@ void RemoteRootWindowHostWin::OnTouchUp(int32 x,
delegate_->OnHostTouchEvent(&event);
}
-void RemoteRootWindowHostWin::OnTouchMoved(int32 x,
+void RemoteWindowTreeHostWin::OnTouchMoved(int32 x,
int32 y,
uint64 timestamp,
uint32 pointer_id) {
@@ -599,7 +599,7 @@ void RemoteRootWindowHostWin::OnTouchMoved(int32 x,
delegate_->OnHostTouchEvent(&event);
}
-void RemoteRootWindowHostWin::OnFileSaveAsDone(bool success,
+void RemoteWindowTreeHostWin::OnFileSaveAsDone(bool success,
const base::FilePath& filename,
int filter_index) {
if (success)
@@ -611,7 +611,7 @@ void RemoteRootWindowHostWin::OnFileSaveAsDone(bool success,
}
-void RemoteRootWindowHostWin::OnFileOpenDone(bool success,
+void RemoteWindowTreeHostWin::OnFileOpenDone(bool success,
const base::FilePath& filename) {
if (success)
file_open_completion_callback_.Run(base::FilePath(filename), 0, NULL);
@@ -621,7 +621,7 @@ void RemoteRootWindowHostWin::OnFileOpenDone(bool success,
failure_callback_.Reset();
}
-void RemoteRootWindowHostWin::OnMultiFileOpenDone(
+void RemoteWindowTreeHostWin::OnMultiFileOpenDone(
bool success,
const std::vector<base::FilePath>& files) {
if (success)
@@ -632,7 +632,7 @@ void RemoteRootWindowHostWin::OnMultiFileOpenDone(
failure_callback_.Reset();
}
-void RemoteRootWindowHostWin::OnSelectFolderDone(
+void RemoteWindowTreeHostWin::OnSelectFolderDone(
bool success,
const base::FilePath& folder) {
if (success)
@@ -643,19 +643,19 @@ void RemoteRootWindowHostWin::OnSelectFolderDone(
failure_callback_.Reset();
}
-void RemoteRootWindowHostWin::OnSetCursorPosAck() {
+void RemoteWindowTreeHostWin::OnSetCursorPosAck() {
DCHECK(ignore_mouse_moves_until_set_cursor_ack_);
ignore_mouse_moves_until_set_cursor_ack_ = false;
}
ui::RemoteInputMethodPrivateWin*
-RemoteRootWindowHostWin::GetRemoteInputMethodPrivate() {
+RemoteWindowTreeHostWin::GetRemoteInputMethodPrivate() {
ui::InputMethod* input_method = GetAshWindow()->GetProperty(
aura::client::kRootWindowInputMethodKey);
return ui::RemoteInputMethodPrivateWin::Get(input_method);
}
-void RemoteRootWindowHostWin::OnImeCandidatePopupChanged(bool visible) {
+void RemoteWindowTreeHostWin::OnImeCandidatePopupChanged(bool visible) {
ui::RemoteInputMethodPrivateWin* remote_input_method_private =
GetRemoteInputMethodPrivate();
if (!remote_input_method_private)
@@ -663,7 +663,7 @@ void RemoteRootWindowHostWin::OnImeCandidatePopupChanged(bool visible) {
remote_input_method_private->OnCandidatePopupChanged(visible);
}
-void RemoteRootWindowHostWin::OnImeCompositionChanged(
+void RemoteWindowTreeHostWin::OnImeCompositionChanged(
const base::string16& text,
int32 selection_start,
int32 selection_end,
@@ -678,7 +678,7 @@ void RemoteRootWindowHostWin::OnImeCompositionChanged(
remote_input_method_private->OnCompositionChanged(composition_text);
}
-void RemoteRootWindowHostWin::OnImeTextCommitted(const base::string16& text) {
+void RemoteWindowTreeHostWin::OnImeTextCommitted(const base::string16& text) {
ui::RemoteInputMethodPrivateWin* remote_input_method_private =
GetRemoteInputMethodPrivate();
if (!remote_input_method_private)
@@ -686,7 +686,7 @@ void RemoteRootWindowHostWin::OnImeTextCommitted(const base::string16& text) {
remote_input_method_private->OnTextCommitted(text);
}
-void RemoteRootWindowHostWin::OnImeInputSourceChanged(uint16 language_id,
+void RemoteWindowTreeHostWin::OnImeInputSourceChanged(uint16 language_id,
bool is_ime) {
ui::RemoteInputMethodPrivateWin* remote_input_method_private =
GetRemoteInputMethodPrivate();
@@ -695,7 +695,7 @@ void RemoteRootWindowHostWin::OnImeInputSourceChanged(uint16 language_id,
remote_input_method_private->OnInputSourceChanged(language_id, is_ime);
}
-void RemoteRootWindowHostWin::DispatchKeyboardMessage(ui::EventType type,
+void RemoteWindowTreeHostWin::DispatchKeyboardMessage(ui::EventType type,
uint32 vkey,
uint32 repeat_count,
uint32 scan_code,
@@ -724,7 +724,7 @@ void RemoteRootWindowHostWin::DispatchKeyboardMessage(ui::EventType type,
}
}
-void RemoteRootWindowHostWin::SetEventFlags(uint32 flags) {
+void RemoteWindowTreeHostWin::SetEventFlags(uint32 flags) {
if (flags == event_flags_)
return;
event_flags_ = flags;
« no previous file with comments | « ui/aura/remote_root_window_host_win.h ('k') | ui/aura/root_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698