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

Unified Diff: ui/views/widget/android/native_widget_android.cc

Issue 1594403003: Remove more ifdefs and TODOs that were added for Aura Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « chrome/browser/ui/views/chrome_views_delegate.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/android/native_widget_android.cc
diff --git a/ui/views/widget/android/native_widget_android.cc b/ui/views/widget/android/native_widget_android.cc
index f7b85f162611a2abec9c00d3615fe2511e5b15c5..fae6139efd871781ef5c1965910524efc9071dce 100644
--- a/ui/views/widget/android/native_widget_android.cc
+++ b/ui/views/widget/android/native_widget_android.cc
@@ -50,9 +50,6 @@
#include "ui/wm/public/window_move_client.h"
#include "ui/wm/public/window_types.h"
-// TODO(bshe): Most of the code is copied from NativeWidgetAura or
-// DesktopNativeWidgetAura. Share more code instead of duplicate code when
-// possible. crbug.com/554961.
namespace {
class WindowTreeClientImpl : public aura::client::WindowTreeClient {
@@ -139,7 +136,6 @@ void NativeWidgetAndroid::InitNativeWidget(const Widget::InitParams& params) {
wm::SetShadowType(window_, wm::SHADOW_TYPE_NONE);
window_->Show();
- // TODO(bshe): Get rid of the hard coded size. Tracked in crbug.com/551923.
host_.reset(aura::WindowTreeHost::Create(gfx::Rect(0, 0, 800, 600)));
host_->InitHost();
host_->AddObserver(this);
@@ -177,9 +173,6 @@ void NativeWidgetAndroid::InitNativeWidget(const Widget::InitParams& params) {
host_->window()->AddChild(window_);
window_reorderer_.reset(
new WindowReorderer(window_, GetWidget()->GetRootView()));
-
- // TODO(bshe): figure out how to add cursor manager, drag drop client and all
- // the necessary parts that exists in desktop_native_widget_aura.
}
NonClientFrameView* NativeWidgetAndroid::CreateNonClientFrameView() {
@@ -234,7 +227,6 @@ void NativeWidgetAndroid::ReorderNativeViews() {
}
void NativeWidgetAndroid::ViewRemoved(View* view) {
- // TODO(bshe): Implement drag and drop. crbug.com/554029.
NOTIMPLEMENTED();
}
@@ -268,14 +260,12 @@ ui::InputMethod* NativeWidgetAndroid::GetInputMethod() {
}
void NativeWidgetAndroid::CenterWindow(const gfx::Size& size) {
- // TODO(bshe): Implement this. See crbug.com/554208.
NOTIMPLEMENTED();
}
void NativeWidgetAndroid::GetWindowPlacement(
gfx::Rect* bounds,
ui::WindowShowState* show_state) const {
- // TODO(bshe): Implement this. See crbug.com/554208.
NOTIMPLEMENTED();
}
@@ -288,12 +278,10 @@ bool NativeWidgetAndroid::SetWindowTitle(const base::string16& title) {
void NativeWidgetAndroid::SetWindowIcons(const gfx::ImageSkia& window_icon,
const gfx::ImageSkia& app_icon) {
- // TODO(bshe): Implement this. See crbug.com/554953.
NOTIMPLEMENTED();
}
void NativeWidgetAndroid::InitModalType(ui::ModalType modal_type) {
- // TODO(bshe): Implement this. See crbug.com/554208.
NOTIMPLEMENTED();
}
@@ -308,14 +296,11 @@ gfx::Rect NativeWidgetAndroid::GetClientAreaBoundsInScreen() const {
}
gfx::Rect NativeWidgetAndroid::GetRestoredBounds() const {
- // TODO(bshe): Implement this. See crbug.com/554208.
NOTIMPLEMENTED();
return gfx::Rect();
}
void NativeWidgetAndroid::SetBounds(const gfx::Rect& bounds) {
- // TODO(bshe): This may not work. We may need to resize SurfaceView too. See
- // crbug.com/554952.
host_->SetBounds(bounds);
}
@@ -325,17 +310,14 @@ void NativeWidgetAndroid::SetSize(const gfx::Size& size) {
}
void NativeWidgetAndroid::StackAbove(gfx::NativeView native_view) {
- // TODO(bshe): Implements window stacking logic. See crbug.com/554047
NOTIMPLEMENTED();
}
void NativeWidgetAndroid::StackAtTop() {
- // TODO(bshe): Implements window stacking logic. See crbug.com/554047
NOTIMPLEMENTED();
}
void NativeWidgetAndroid::StackBelow(gfx::NativeView native_view) {
- // TODO(bshe): Implements window stacking logic. See crbug.com/554047
NOTIMPLEMENTED();
}
@@ -344,7 +326,6 @@ void NativeWidgetAndroid::SetShape(SkRegion* region) {
}
void NativeWidgetAndroid::Close() {
- // TODO(bshe): This might not be right. See crbug.com/554259.
DCHECK(ownership_ == Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET);
GetNativeWindow()->SuppressPaint();
Hide();
@@ -358,7 +339,6 @@ void NativeWidgetAndroid::Close() {
}
void NativeWidgetAndroid::CloseNow() {
- // TODO(bshe): This might not be right. See crbug.com/554259.
host_->RemoveObserver(this);
host_.reset();
delete window_;
@@ -410,44 +390,36 @@ bool NativeWidgetAndroid::IsAlwaysOnTop() const {
}
void NativeWidgetAndroid::SetVisibleOnAllWorkspaces(bool always_visible) {
- // TODO(bshe): Implement this. See crbug.com/554208.
NOTIMPLEMENTED();
}
void NativeWidgetAndroid::Maximize() {
- // TODO(bshe): Implement this. See crbug.com/554208.
NOTIMPLEMENTED();
}
void NativeWidgetAndroid::Minimize() {
- // TODO(bshe): Implement this. See crbug.com/554208.
NOTIMPLEMENTED();
}
bool NativeWidgetAndroid::IsMaximized() const {
- // TODO(bshe): Implement this. See crbug.com/554208.
NOTIMPLEMENTED();
return false;
}
bool NativeWidgetAndroid::IsMinimized() const {
- // TODO(bshe): Implement this. See crbug.com/554208.
NOTIMPLEMENTED();
return false;
}
void NativeWidgetAndroid::Restore() {
- // TODO(bshe): Implement this. See crbug.com/554208.
NOTIMPLEMENTED();
}
void NativeWidgetAndroid::SetFullscreen(bool fullscreen) {
- // TODO(bshe): Implement this. See crbug.com/554208.
NOTIMPLEMENTED();
}
bool NativeWidgetAndroid::IsFullscreen() const {
- // TODO(bshe): Implement this. See crbug.com/554208.
NOTIMPLEMENTED();
return false;
}
@@ -507,13 +479,11 @@ Widget::MoveLoopResult NativeWidgetAndroid::RunMoveLoop(
const gfx::Vector2d& drag_offset,
Widget::MoveLoopSource source,
Widget::MoveLoopEscapeBehavior escape_behavior) {
- // TODO(bshe): Implement this. See crbug.com/554208.
NOTIMPLEMENTED();
return Widget::MOVE_LOOP_SUCCESSFUL;
}
void NativeWidgetAndroid::EndMoveLoop() {
- // TODO(bshe): Implement this. See crbug.com/554208.
NOTIMPLEMENTED();
}
@@ -768,23 +738,19 @@ void NativeWidgetAndroid::OnWindowFocused(aura::Window* gained_focus,
// NativeWidgetAndroid, aura::WindowDragDropDelegate implementation:
void NativeWidgetAndroid::OnDragEntered(const ui::DropTargetEvent& event) {
- // TODO: Implement drag and drop. crbug.com/554029.
NOTIMPLEMENTED();
}
int NativeWidgetAndroid::OnDragUpdated(const ui::DropTargetEvent& event) {
- // TODO: Implement drag and drop. crbug.com/554029.
NOTIMPLEMENTED();
return 0;
}
void NativeWidgetAndroid::OnDragExited() {
- // TODO: Implement drag and drop. crbug.com/554029.
NOTIMPLEMENTED();
}
int NativeWidgetAndroid::OnPerformDrop(const ui::DropTargetEvent& event) {
sky 2016/01/19 17:05:20 Should we remove this file entirely?
- // TODO: Implement drag and drop. crbug.com/554029.
NOTIMPLEMENTED();
return 0;
}
« no previous file with comments | « chrome/browser/ui/views/chrome_views_delegate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698