Commit 9572c882 authored by Steven Bennetts's avatar Steven Bennetts Committed by Commit Bot

ChromeKeyboardUI: Fix method order and other cleanup

Bug: 843332
Change-Id: Iff950164803f31d013a8a80fdded73f1e7f3bd7e
Reviewed-on: https://chromium-review.googlesource.com/1182411
Commit-Queue: Steven Bennetts <stevenjb@chromium.org>
Reviewed-by: default avatarDarren Shen <shend@chromium.org>
Reviewed-by: default avatarJames Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#584846}
parent 4fc85b27
This diff is collapsed.
......@@ -15,23 +15,23 @@
#include "ui/keyboard/keyboard_controller_observer.h"
#include "ui/keyboard/keyboard_ui.h"
namespace {
class WindowBoundsChangeObserver;
}
namespace aura {
class Window;
}
namespace gfx {
class Rect;
}
namespace content {
class BrowserContext;
class WebContents;
} // namespace content
namespace ui {
class InputMethod;
class Shadow;
}
} // namespace ui
// Subclass of KeyboardUI. It is used by KeyboardController to get
// access to the virtual keyboard window and setup Chrome extension functions.
......@@ -57,11 +57,12 @@ class ChromeKeyboardUI : public keyboard::KeyboardUI,
// Overridden from KeyboardUI:
aura::Window* GetKeyboardWindow() override;
bool HasKeyboardWindow() const override;
ui::InputMethod* GetInputMethod() override;
void SetController(keyboard::KeyboardController* controller) override;
void ReloadKeyboardIfNeeded() override;
void InitInsets(const gfx::Rect& new_bounds) override;
void ResetInsets() override;
protected:
// aura::WindowObserver overrides:
void OnWindowBoundsChanged(aura::Window* window,
const gfx::Rect& old_bounds,
......@@ -71,11 +72,9 @@ class ChromeKeyboardUI : public keyboard::KeyboardUI,
void OnWindowParentChanged(aura::Window* window,
aura::Window* parent) override;
content::BrowserContext* browser_context() { return browser_context_; }
const aura::Window* GetKeyboardRootWindow() const;
private:
class WindowBoundsChangeObserver;
std::unique_ptr<content::WebContents> CreateWebContents();
// Loads the web contents for the given |url|.
......@@ -91,7 +90,7 @@ class ChromeKeyboardUI : public keyboard::KeyboardUI,
// Whether this window should do an overscroll to avoid occlusion by the
// virtual keyboard. IME windows and virtual keyboard windows should always
// avoid overscroll.
bool ShouldWindowOverscroll(aura::Window* window) const;
bool ShouldWindowOverscroll(aura::Window* window);
// Adds an observer for tracking changes to a window size or
// position while the keyboard is displayed. Any window repositioning
......@@ -108,10 +107,6 @@ class ChromeKeyboardUI : public keyboard::KeyboardUI,
// loading the keyboard page.
void SetupWebContents(content::WebContents* contents);
// Overridden from KeyboardUI:
ui::InputMethod* GetInputMethod() override;
void SetController(keyboard::KeyboardController* controller) override;
// content::WebContentsObserver overrides
void RenderViewCreated(content::RenderViewHost* render_view_host) override;
void DidFinishLoad(content::RenderFrameHost* render_frame_host,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment