forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move CursorFactoryOzone to ui/base/cursor/
This CL moves cursor_factory_ozone.* to ui/base/cursor/cursor_factory.* to serve as a superclass for all platform cursor factories. Bug: 1029142, 1040499 Change-Id: I94370bfe98efd3af4c6596e2de652370d011ea7e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2188395 Commit-Queue: Henrique Ferreiro <hferreiro@igalia.com> Reviewed-by: Scott Violet <sky@chromium.org> Cr-Commit-Position: refs/heads/master@{#771267}
- Loading branch information
Showing
33 changed files
with
143 additions
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,3 @@ | ||
include_rules = [ | ||
"+third_party/blink/public/platform", | ||
] | ||
|
||
specific_include_rules = { | ||
# TODO(crbug.com/734668): Dependencies on ozone should be removed, as content | ||
# embedded in mus won't be able to talk to the native ozone. | ||
"webcursor_ozone.cc": [ | ||
"+ui/ozone/public/cursor_factory_ozone.h", | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
// Copyright 2014 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#include "ui/base/cursor/cursor_factory.h" | ||
|
||
#include "base/check.h" | ||
#include "base/check_op.h" | ||
#include "base/notreached.h" | ||
|
||
namespace ui { | ||
|
||
namespace { | ||
|
||
CursorFactory* g_instance = nullptr; | ||
|
||
} // namespace | ||
|
||
CursorFactory::CursorFactory() { | ||
DCHECK(!g_instance) << "There should only be a single CursorFactory."; | ||
g_instance = this; | ||
} | ||
|
||
CursorFactory::~CursorFactory() { | ||
DCHECK_EQ(g_instance, this); | ||
g_instance = nullptr; | ||
} | ||
|
||
CursorFactory* CursorFactory::GetInstance() { | ||
DCHECK(g_instance); | ||
return g_instance; | ||
} | ||
|
||
PlatformCursor CursorFactory::GetDefaultCursor(mojom::CursorType type) { | ||
NOTIMPLEMENTED(); | ||
return 0; | ||
} | ||
|
||
PlatformCursor CursorFactory::CreateImageCursor(const SkBitmap& bitmap, | ||
const gfx::Point& hotspot, | ||
float bitmap_dpi) { | ||
NOTIMPLEMENTED(); | ||
return 0; | ||
} | ||
|
||
PlatformCursor CursorFactory::CreateAnimatedCursor( | ||
const std::vector<SkBitmap>& bitmaps, | ||
const gfx::Point& hotspot, | ||
int frame_delay_ms, | ||
float bitmap_dpi) { | ||
NOTIMPLEMENTED(); | ||
return 0; | ||
} | ||
|
||
void CursorFactory::RefImageCursor(PlatformCursor cursor) { | ||
NOTIMPLEMENTED(); | ||
} | ||
|
||
void CursorFactory::UnrefImageCursor(PlatformCursor cursor) { | ||
NOTIMPLEMENTED(); | ||
} | ||
|
||
} // namespace ui |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.