diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-19 21:04:22 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-19 21:04:22 +0000 |
commit | bdd543c265c188c5ff77ae304434276b492970cd (patch) | |
tree | cc7e99f6c8912dc82438d2ec212c5e9883ac331c /views/window | |
parent | 8c20e3d273ad6c64bd033557bb52f2cb8f62898b (diff) | |
download | chromium_src-bdd543c265c188c5ff77ae304434276b492970cd.zip chromium_src-bdd543c265c188c5ff77ae304434276b492970cd.tar.gz chromium_src-bdd543c265c188c5ff77ae304434276b492970cd.tar.bz2 |
Rename WindowWin|Gtk->NativeWindowWin|Gtk
BUG=72040
TEST=none
TBR=sky
Review URL: http://codereview.chromium.org/7048006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85969 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/window')
-rw-r--r-- | views/window/custom_frame_view.cc | 4 | ||||
-rw-r--r-- | views/window/native_window_gtk.cc (renamed from views/window/window_gtk.cc) | 128 | ||||
-rw-r--r-- | views/window/native_window_gtk.h (renamed from views/window/window_gtk.h) | 20 | ||||
-rw-r--r-- | views/window/native_window_win.cc (renamed from views/window/window_win.cc) | 216 | ||||
-rw-r--r-- | views/window/native_window_win.h (renamed from views/window/window_win.h) | 26 | ||||
-rw-r--r-- | views/window/native_window_win_unittest.cc (renamed from views/window/window_win_unittest.cc) | 4 |
6 files changed, 206 insertions, 192 deletions
diff --git a/views/window/custom_frame_view.cc b/views/window/custom_frame_view.cc index 305eae1..c526bf8 100644 --- a/views/window/custom_frame_view.cc +++ b/views/window/custom_frame_view.cc @@ -21,7 +21,7 @@ #endif #if defined(OS_WIN) -#include "views/window/window_win.h" +#include "views/window/native_window_win.h" #endif namespace views { @@ -568,7 +568,7 @@ void CustomFrameView::InitClass() { static bool initialized = false; if (!initialized) { #if defined(OS_WIN) - title_font_ = new gfx::Font(WindowWin::GetWindowTitleFont()); + title_font_ = new gfx::Font(NativeWindowWin::GetWindowTitleFont()); #elif defined(OS_LINUX) // TODO(ben): need to resolve what font this is. title_font_ = new gfx::Font(); diff --git a/views/window/window_gtk.cc b/views/window/native_window_gtk.cc index af2770b..1afa346 100644 --- a/views/window/window_gtk.cc +++ b/views/window/native_window_gtk.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "views/window/window_gtk.h" +#include "views/window/native_window_gtk.h" #include "base/i18n/rtl.h" #include "base/utf_string_conversions.h" @@ -79,7 +79,7 @@ GdkCursorType HitTestCodeToGdkCursorType(int hittest_code) { namespace views { -WindowGtk::WindowGtk(internal::NativeWindowDelegate* delegate) +NativeWindowGtk::NativeWindowGtk(internal::NativeWindowDelegate* delegate) : NativeWidgetGtk(delegate->AsNativeWidgetDelegate()), delegate_(delegate), window_state_(GDK_WINDOW_STATE_WITHDRAWN), @@ -87,13 +87,14 @@ WindowGtk::WindowGtk(internal::NativeWindowDelegate* delegate) is_window_ = true; } -WindowGtk::~WindowGtk() { +NativeWindowGtk::~NativeWindowGtk() { } //////////////////////////////////////////////////////////////////////////////// -// WindowGtk, NativeWidgetGtk overrides: +// NativeWindowGtk, NativeWidgetGtk overrides: -gboolean WindowGtk::OnButtonPress(GtkWidget* widget, GdkEventButton* event) { +gboolean NativeWindowGtk::OnButtonPress(GtkWidget* widget, + GdkEventButton* event) { GdkEventButton transformed_event = *event; MouseEvent mouse_event(TransformEvent(&transformed_event)); @@ -143,13 +144,14 @@ gboolean WindowGtk::OnButtonPress(GtkWidget* widget, GdkEventButton* event) { return NativeWidgetGtk::OnButtonPress(widget, event); } -gboolean WindowGtk::OnConfigureEvent(GtkWidget* widget, - GdkEventConfigure* event) { +gboolean NativeWindowGtk::OnConfigureEvent(GtkWidget* widget, + GdkEventConfigure* event) { SaveWindowPosition(); return FALSE; } -gboolean WindowGtk::OnMotionNotify(GtkWidget* widget, GdkEventMotion* event) { +gboolean NativeWindowGtk::OnMotionNotify(GtkWidget* widget, + GdkEventMotion* event) { GdkEventMotion transformed_event = *event; TransformEvent(&transformed_event); gfx::Point translated_location(transformed_event.x, transformed_event.y); @@ -165,7 +167,8 @@ gboolean WindowGtk::OnMotionNotify(GtkWidget* widget, GdkEventMotion* event) { return NativeWidgetGtk::OnMotionNotify(widget, event); } -void WindowGtk::OnSizeAllocate(GtkWidget* widget, GtkAllocation* allocation) { +void NativeWindowGtk::OnSizeAllocate(GtkWidget* widget, + GtkAllocation* allocation) { NativeWidgetGtk::OnSizeAllocate(widget, allocation); // The Window's NonClientView may provide a custom shape for the Window. @@ -181,26 +184,27 @@ void WindowGtk::OnSizeAllocate(GtkWidget* widget, GtkAllocation* allocation) { SaveWindowPosition(); } -gboolean WindowGtk::OnWindowStateEvent(GtkWidget* widget, - GdkEventWindowState* event) { +gboolean NativeWindowGtk::OnWindowStateEvent(GtkWidget* widget, + GdkEventWindowState* event) { window_state_ = event->new_window_state; if (!(window_state_ & GDK_WINDOW_STATE_WITHDRAWN)) SaveWindowPosition(); return FALSE; } -gboolean WindowGtk::OnLeaveNotify(GtkWidget* widget, GdkEventCrossing* event) { +gboolean NativeWindowGtk::OnLeaveNotify(GtkWidget* widget, + GdkEventCrossing* event) { gdk_window_set_cursor(widget->window, gfx::GetCursor(GDK_LEFT_PTR)); return NativeWidgetGtk::OnLeaveNotify(widget, event); } -void WindowGtk::IsActiveChanged() { +void NativeWindowGtk::IsActiveChanged() { NativeWidgetGtk::IsActiveChanged(); delegate_->OnNativeWindowActivationChanged(IsActive()); } -void WindowGtk::InitNativeWidget(const Widget::InitParams& params) { +void NativeWindowGtk::InitNativeWidget(const Widget::InitParams& params) { NativeWidgetGtk::InitNativeWidget(params); g_signal_connect(G_OBJECT(GetNativeWindow()), "configure-event", @@ -210,33 +214,33 @@ void WindowGtk::InitNativeWidget(const Widget::InitParams& params) { } //////////////////////////////////////////////////////////////////////////////// -// WindowGtk, NativeWindow implementation: +// NativeWindowGtk, NativeWindow implementation: -NativeWidget* WindowGtk::AsNativeWidget() { +NativeWidget* NativeWindowGtk::AsNativeWidget() { return this; } -const NativeWidget* WindowGtk::AsNativeWidget() const { +const NativeWidget* NativeWindowGtk::AsNativeWidget() const { return this; } -gfx::Rect WindowGtk::GetRestoredBounds() const { +gfx::Rect NativeWindowGtk::GetRestoredBounds() const { // We currently don't support tiling, so this doesn't matter. return GetWindowScreenBounds(); } -void WindowGtk::ShowNativeWindow(ShowState state) { +void NativeWindowGtk::ShowNativeWindow(ShowState state) { // No concept of maximization (yet) on ChromeOS. if (state == NativeWindow::SHOW_INACTIVE) gtk_window_set_focus_on_map(GetNativeWindow(), false); gtk_widget_show(GetNativeView()); } -void WindowGtk::BecomeModal() { +void NativeWindowGtk::BecomeModal() { gtk_window_set_modal(GetNativeWindow(), true); } -void WindowGtk::CenterWindow(const gfx::Size& size) { +void NativeWindowGtk::CenterWindow(const gfx::Size& size) { gfx::Rect center_rect; GtkWindow* parent = gtk_window_get_transient_for(GetNativeWindow()); @@ -259,68 +263,68 @@ void WindowGtk::CenterWindow(const gfx::Size& size) { SetWindowBounds(bounds, NULL); } -void WindowGtk::GetWindowBoundsAndMaximizedState(gfx::Rect* bounds, - bool* maximized) const { +void NativeWindowGtk::GetWindowBoundsAndMaximizedState(gfx::Rect* bounds, + bool* maximized) const { // Do nothing for now. ChromeOS isn't yet saving window placement. } -void WindowGtk::EnableClose(bool enable) { +void NativeWindowGtk::EnableClose(bool enable) { gtk_window_set_deletable(GetNativeWindow(), enable); } -void WindowGtk::SetWindowTitle(const std::wstring& title) { +void NativeWindowGtk::SetWindowTitle(const std::wstring& title) { // We don't have a window title on ChromeOS (right now). } -void WindowGtk::SetWindowIcons(const SkBitmap& window_icon, - const SkBitmap& app_icon) { +void NativeWindowGtk::SetWindowIcons(const SkBitmap& window_icon, + const SkBitmap& app_icon) { // We don't have window icons on ChromeOS. } -void WindowGtk::SetAccessibleName(const std::wstring& name) { +void NativeWindowGtk::SetAccessibleName(const std::wstring& name) { } -void WindowGtk::SetAccessibleRole(ui::AccessibilityTypes::Role role) { +void NativeWindowGtk::SetAccessibleRole(ui::AccessibilityTypes::Role role) { } -void WindowGtk::SetAccessibleState(ui::AccessibilityTypes::State state) { +void NativeWindowGtk::SetAccessibleState(ui::AccessibilityTypes::State state) { } -Window* WindowGtk::GetWindow() { +Window* NativeWindowGtk::GetWindow() { return delegate_->AsWindow(); } -const Window* WindowGtk::GetWindow() const { +const Window* NativeWindowGtk::GetWindow() const { return delegate_->AsWindow(); } -void WindowGtk::SetWindowBounds(const gfx::Rect& bounds, +void NativeWindowGtk::SetWindowBounds(const gfx::Rect& bounds, gfx::NativeWindow other_window) { // TODO: need to deal with other_window. NativeWidgetGtk::SetBounds(bounds); } -void WindowGtk::HideWindow() { +void NativeWindowGtk::HideWindow() { GetWindow()->Hide(); } -void WindowGtk::Activate() { +void NativeWindowGtk::Activate() { gtk_window_present(GTK_WINDOW(GetNativeView())); } -void WindowGtk::Deactivate() { +void NativeWindowGtk::Deactivate() { gdk_window_lower(GTK_WIDGET(GetNativeView())->window); } -void WindowGtk::Maximize() { +void NativeWindowGtk::Maximize() { gtk_window_maximize(GetNativeWindow()); } -void WindowGtk::Minimize() { +void NativeWindowGtk::Minimize() { gtk_window_iconify(GetNativeWindow()); } -void WindowGtk::Restore() { +void NativeWindowGtk::Restore() { if (IsMaximized()) gtk_window_unmaximize(GetNativeWindow()); else if (IsMinimized()) @@ -329,60 +333,60 @@ void WindowGtk::Restore() { SetFullscreen(false); } -bool WindowGtk::IsActive() const { +bool NativeWindowGtk::IsActive() const { return NativeWidgetGtk::IsActive(); } -bool WindowGtk::IsVisible() const { +bool NativeWindowGtk::IsVisible() const { return GTK_WIDGET_VISIBLE(GetNativeView()); } -bool WindowGtk::IsMaximized() const { +bool NativeWindowGtk::IsMaximized() const { return window_state_ & GDK_WINDOW_STATE_MAXIMIZED; } -bool WindowGtk::IsMinimized() const { +bool NativeWindowGtk::IsMinimized() const { return window_state_ & GDK_WINDOW_STATE_ICONIFIED; } -void WindowGtk::SetFullscreen(bool fullscreen) { +void NativeWindowGtk::SetFullscreen(bool fullscreen) { if (fullscreen) gtk_window_fullscreen(GetNativeWindow()); else gtk_window_unfullscreen(GetNativeWindow()); } -bool WindowGtk::IsFullscreen() const { +bool NativeWindowGtk::IsFullscreen() const { return window_state_ & GDK_WINDOW_STATE_FULLSCREEN; } -void WindowGtk::SetUseDragFrame(bool use_drag_frame) { +void NativeWindowGtk::SetUseDragFrame(bool use_drag_frame) { NOTIMPLEMENTED(); } -NonClientFrameView* WindowGtk::CreateFrameViewForWindow() { +NonClientFrameView* NativeWindowGtk::CreateFrameViewForWindow() { return new CustomFrameView(delegate_->AsWindow()); } -void WindowGtk::SetAlwaysOnTop(bool always_on_top) { +void NativeWindowGtk::SetAlwaysOnTop(bool always_on_top) { gtk_window_set_keep_above(GetNativeWindow(), always_on_top); } -void WindowGtk::UpdateFrameAfterFrameChange() { +void NativeWindowGtk::UpdateFrameAfterFrameChange() { // We currently don't support different frame types on Gtk, so we don't // need to implement this. NOTIMPLEMENTED(); } -gfx::NativeWindow WindowGtk::GetNativeWindow() const { +gfx::NativeWindow NativeWindowGtk::GetNativeWindow() const { return GTK_WINDOW(GetNativeView()); } -bool WindowGtk::ShouldUseNativeFrame() const { +bool NativeWindowGtk::ShouldUseNativeFrame() const { return false; } -void WindowGtk::FrameTypeChanged() { +void NativeWindowGtk::FrameTypeChanged() { // This is called when the Theme has changed, so forward the event to the root // widget. GetWidget()->ThemeChanged(); @@ -390,23 +394,23 @@ void WindowGtk::FrameTypeChanged() { } //////////////////////////////////////////////////////////////////////////////// -// WindowGtk, private: +// NativeWindowGtk, private: // static -gboolean WindowGtk::CallConfigureEvent(GtkWidget* widget, - GdkEventConfigure* event, - WindowGtk* window_gtk) { +gboolean NativeWindowGtk::CallConfigureEvent(GtkWidget* widget, + GdkEventConfigure* event, + NativeWindowGtk* window_gtk) { return window_gtk->OnConfigureEvent(widget, event); } // static -gboolean WindowGtk::CallWindowStateEvent(GtkWidget* widget, - GdkEventWindowState* event, - WindowGtk* window_gtk) { +gboolean NativeWindowGtk::CallWindowStateEvent(GtkWidget* widget, + GdkEventWindowState* event, + NativeWindowGtk* window_gtk) { return window_gtk->OnWindowStateEvent(widget, event); } -void WindowGtk::SaveWindowPosition() { +void NativeWindowGtk::SaveWindowPosition() { // The delegate may have gone away on us. if (!GetWindow()->window_delegate()) return; @@ -417,7 +421,7 @@ void WindowGtk::SaveWindowPosition() { maximized); } -void WindowGtk::OnDestroy(GtkWidget* widget) { +void NativeWindowGtk::OnDestroy(GtkWidget* widget) { delegate_->OnNativeWindowDestroying(); NativeWidgetGtk::OnDestroy(widget); delegate_->OnNativeWindowDestroyed(); @@ -429,7 +433,7 @@ void WindowGtk::OnDestroy(GtkWidget* widget) { // static NativeWindow* NativeWindow::CreateNativeWindow( internal::NativeWindowDelegate* delegate) { - return new WindowGtk(delegate); + return new NativeWindowGtk(delegate); } } // namespace views diff --git a/views/window/window_gtk.h b/views/window/native_window_gtk.h index 15a0c08..f45380e 100644 --- a/views/window/window_gtk.h +++ b/views/window/native_window_gtk.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef VIEWS_WINDOW_WINDOW_GTK_H_ -#define VIEWS_WINDOW_WINDOW_GTK_H_ +#ifndef VIEWS_WINDOW_NATIVE_WINDOW_GTK_H_ +#define VIEWS_WINDOW_NATIVE_WINDOW_GTK_H_ #pragma once #include "base/basictypes.h" @@ -24,11 +24,11 @@ class NativeWindowDelegate; class Client; class WindowDelegate; -// Window implementation for GTK. -class WindowGtk : public NativeWidgetGtk, public NativeWindow { +// Window implementation for Gtk. +class NativeWindowGtk : public NativeWidgetGtk, public NativeWindow { public: - explicit WindowGtk(internal::NativeWindowDelegate* delegate); - virtual ~WindowGtk(); + explicit NativeWindowGtk(internal::NativeWindowDelegate* delegate); + virtual ~NativeWindowGtk(); virtual Window* GetWindow() OVERRIDE; virtual const Window* GetWindow() const OVERRIDE; @@ -93,10 +93,10 @@ class WindowGtk : public NativeWidgetGtk, public NativeWindow { private: static gboolean CallConfigureEvent(GtkWidget* widget, GdkEventConfigure* event, - WindowGtk* window_gtk); + NativeWindowGtk* window_gtk); static gboolean CallWindowStateEvent(GtkWidget* widget, GdkEventWindowState* event, - WindowGtk* window_gtk); + NativeWindowGtk* window_gtk); // Asks the delegate if any to save the window's location and size. void SaveWindowPosition(); @@ -119,9 +119,9 @@ class WindowGtk : public NativeWidgetGtk, public NativeWindow { // Set to true if the window is in the process of closing. bool window_closed_; - DISALLOW_COPY_AND_ASSIGN(WindowGtk); + DISALLOW_COPY_AND_ASSIGN(NativeWindowGtk); }; } // namespace views -#endif // VIEWS_WINDOW_WINDOW_GTK_H_ +#endif // VIEWS_WINDOW_NATIVE_WINDOW_GTK_H_ diff --git a/views/window/window_win.cc b/views/window/native_window_win.cc index bdae725..487aa0d 100644 --- a/views/window/window_win.cc +++ b/views/window/native_window_win.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "views/window/window_win.h" +#include "views/window/native_window_win.h" #include <dwmapi.h> #include <shellapi.h> @@ -215,9 +215,9 @@ void EnsureRectIsVisibleInRect(const gfx::Rect& parent_rect, // // I would love to hear Raymond Chen's explanation for all this. And maybe a // list of other messages that this applies to ;-) -class WindowWin::ScopedRedrawLock { +class NativeWindowWin::ScopedRedrawLock { public: - explicit ScopedRedrawLock(WindowWin* window) : window_(window) { + explicit ScopedRedrawLock(NativeWindowWin* window) : window_(window) { window_->LockUpdates(); } @@ -227,13 +227,13 @@ class WindowWin::ScopedRedrawLock { private: // The window having its style changed. - WindowWin* window_; + NativeWindowWin* window_; }; //////////////////////////////////////////////////////////////////////////////// -// WindowWin, public: +// NativeWindowWin, public: -WindowWin::WindowWin(internal::NativeWindowDelegate* delegate) +NativeWindowWin::NativeWindowWin(internal::NativeWindowDelegate* delegate) : NativeWidgetWin(delegate->AsNativeWidgetDelegate()), delegate_(delegate), focus_on_creation_(true), @@ -256,10 +256,10 @@ WindowWin::WindowWin(internal::NativeWindowDelegate* delegate) -WindowWin::~WindowWin() { +NativeWindowWin::~NativeWindowWin() { } -void WindowWin::Show(int show_state) { +void NativeWindowWin::Show(int show_state) { ShowWindow(show_state); // When launched from certain programs like bash and Windows Live Messenger, // show_state is set to SW_HIDE, so we need to correct that condition. We @@ -282,12 +282,12 @@ void WindowWin::Show(int show_state) { SetInitialFocus(); } -void WindowWin::PushForceHidden() { +void NativeWindowWin::PushForceHidden() { if (force_hidden_count_++ == 0) Hide(); } -void WindowWin::PopForceHidden() { +void NativeWindowWin::PopForceHidden() { if (--force_hidden_count_ <= 0) { force_hidden_count_ = 0; ShowWindow(SW_SHOW); @@ -295,7 +295,7 @@ void WindowWin::PopForceHidden() { } // static -gfx::Font WindowWin::GetWindowTitleFont() { +gfx::Font NativeWindowWin::GetWindowTitleFont() { NONCLIENTMETRICS ncm; base::win::GetNonClientMetrics(&ncm); l10n_util::AdjustUIFont(&(ncm.lfCaptionFont)); @@ -304,9 +304,9 @@ gfx::Font WindowWin::GetWindowTitleFont() { } /////////////////////////////////////////////////////////////////////////////// -// WindowWin, protected: +// NativeWindowWin, protected: -gfx::Insets WindowWin::GetClientAreaInsets() const { +gfx::Insets NativeWindowWin::GetClientAreaInsets() const { // Returning an empty Insets object causes the default handling in // NativeWidgetWin::OnNCCalcSize() to be invoked. if (GetWindow()->ShouldUseNativeFrame()) @@ -333,14 +333,14 @@ gfx::Insets WindowWin::GetClientAreaInsets() const { return gfx::Insets(0, 0, IsFullscreen() ? 0 : 1, 0); } -int WindowWin::GetShowState() const { +int NativeWindowWin::GetShowState() const { return SW_SHOWNORMAL; } /////////////////////////////////////////////////////////////////////////////// -// WindowWin, NativeWidgetWin overrides: +// NativeWindowWin, NativeWidgetWin overrides: -void WindowWin::InitNativeWidget(const Widget::InitParams& params) { +void NativeWindowWin::InitNativeWidget(const Widget::InitParams& params) { if (window_style() == 0) set_window_style(CalculateWindowStyle()); if (window_ex_style() == 0) @@ -352,7 +352,7 @@ void WindowWin::InitNativeWidget(const Widget::InitParams& params) { NativeWidgetWin::InitNativeWidget(params); } -void WindowWin::OnActivateApp(BOOL active, DWORD thread_id) { +void NativeWindowWin::OnActivateApp(BOOL active, DWORD thread_id) { if (!active && thread_id != GetCurrentThreadId()) { // Another application was activated, we should reset any state that // disables inactive rendering now. @@ -363,19 +363,23 @@ void WindowWin::OnActivateApp(BOOL active, DWORD thread_id) { } } -LRESULT WindowWin::OnAppCommand(HWND window, short app_command, WORD device, - int keystate) { +LRESULT NativeWindowWin::OnAppCommand(HWND window, + short app_command, + WORD device, + int keystate) { // We treat APPCOMMAND ids as an extension of our command namespace, and just // let the delegate figure out what to do... return GetWindow()->window_delegate()->ExecuteWindowsCommand(app_command) || NativeWidgetWin::OnAppCommand(window, app_command, device, keystate); } -void WindowWin::OnClose() { +void NativeWindowWin::OnClose() { GetWindow()->Close(); } -void WindowWin::OnCommand(UINT notification_code, int command_id, HWND window) { +void NativeWindowWin::OnCommand(UINT notification_code, + int command_id, + HWND window) { // If the notification code is > 1 it means it is control specific and we // should ignore it. if (notification_code > 1 || @@ -384,14 +388,15 @@ void WindowWin::OnCommand(UINT notification_code, int command_id, HWND window) { } } -void WindowWin::OnDestroy() { +void NativeWindowWin::OnDestroy() { delegate_->OnNativeWindowDestroying(); RestoreEnabledIfNecessary(); NativeWidgetWin::OnDestroy(); } -LRESULT WindowWin::OnDwmCompositionChanged(UINT msg, WPARAM w_param, - LPARAM l_param) { +LRESULT NativeWindowWin::OnDwmCompositionChanged(UINT msg, + WPARAM w_param, + LPARAM l_param) { // For some reason, we need to hide the window while we're changing the frame // type only when we're changing it in response to WM_DWMCOMPOSITIONCHANGED. // If we don't, the client area will be filled with black. I'm suspecting @@ -402,29 +407,29 @@ LRESULT WindowWin::OnDwmCompositionChanged(UINT msg, WPARAM w_param, return 0; } -void WindowWin::OnEnterSizeMove() { +void NativeWindowWin::OnEnterSizeMove() { NativeWidgetWin::OnEnterSizeMove(); delegate_->OnNativeWindowBeginUserBoundsChange(); } -void WindowWin::OnExitSizeMove() { +void NativeWindowWin::OnExitSizeMove() { NativeWidgetWin::OnExitSizeMove(); delegate_->OnNativeWindowEndUserBoundsChange(); } -void WindowWin::OnFinalMessage(HWND window) { +void NativeWindowWin::OnFinalMessage(HWND window) { delegate_->OnNativeWindowDestroyed(); NativeWidgetWin::OnFinalMessage(window); } -void WindowWin::OnGetMinMaxInfo(MINMAXINFO* minmax_info) { +void NativeWindowWin::OnGetMinMaxInfo(MINMAXINFO* minmax_info) { gfx::Size min_window_size(delegate_->GetMinimumSize()); minmax_info->ptMinTrackSize.x = min_window_size.width(); minmax_info->ptMinTrackSize.y = min_window_size.height(); NativeWidgetWin::OnGetMinMaxInfo(minmax_info); } -void WindowWin::OnInitMenu(HMENU menu) { +void NativeWindowWin::OnInitMenu(HMENU menu) { // We only need to manually enable the system menu if we're not using a native // frame. if (GetWindow()->ShouldUseNativeFrame()) @@ -448,12 +453,15 @@ void WindowWin::OnInitMenu(HMENU menu) { !is_minimized); } -LRESULT WindowWin::OnMouseActivate(UINT message, WPARAM w_param, - LPARAM l_param) { +LRESULT NativeWindowWin::OnMouseActivate(UINT message, + WPARAM w_param, + LPARAM l_param) { return delegate_->CanActivate() ? MA_ACTIVATE : MA_NOACTIVATEANDEAT; } -LRESULT WindowWin::OnMouseRange(UINT message, WPARAM w_param, LPARAM l_param) { +LRESULT NativeWindowWin::OnMouseRange(UINT message, + WPARAM w_param, + LPARAM l_param) { if (message == WM_RBUTTONUP && is_right_mouse_pressed_on_caption_) { is_right_mouse_pressed_on_caption_ = false; ReleaseCapture(); @@ -511,8 +519,8 @@ LRESULT WindowWin::OnMouseRange(UINT message, WPARAM w_param, LPARAM l_param) { causes mouse-releases to the non-client area to be eaten, so it can't be enabled. if (message == WM_NCLBUTTONDOWN) { - // WindowWin::OnNCLButtonDown set the message as unhandled. This normally - // means NativeWidgetWin::ProcessWindowMessage will pass it to + // NativeWindowWin::OnNCLButtonDown set the message as un-handled. This + // normally means NativeWidgetWin::ProcessWindowMessage will pass it to // DefWindowProc. Sadly, DefWindowProc for WM_NCLBUTTONDOWN does weird // non-client painting, so we need to call it directly here inside a // scoped update lock. @@ -539,7 +547,7 @@ BOOL CALLBACK EnumChildWindowsForRedraw(HWND hwnd, LPARAM lparam) { } } // namespace -LRESULT WindowWin::OnNCActivate(BOOL active) { +LRESULT NativeWindowWin::OnNCActivate(BOOL active) { if (!delegate_->CanActivate()) return TRUE; @@ -572,7 +580,7 @@ LRESULT WindowWin::OnNCActivate(BOOL active) { return CallDefaultNCActivateHandler(inactive_rendering_disabled || active); } -LRESULT WindowWin::OnNCCalcSize(BOOL mode, LPARAM l_param) { +LRESULT NativeWindowWin::OnNCCalcSize(BOOL mode, LPARAM l_param) { // We only override the default handling if we need to specify a custom // non-client edge width. Note that in most cases "no insets" means no // custom width, but in fullscreen mode we want a custom width of 0. @@ -652,7 +660,7 @@ LRESULT WindowWin::OnNCCalcSize(BOOL mode, LPARAM l_param) { return mode ? WVR_REDRAW : 0; } -LRESULT WindowWin::OnNCHitTest(const CPoint& point) { +LRESULT NativeWindowWin::OnNCHitTest(const CPoint& point) { // If the DWM is rendering the window controls, we need to give the DWM's // default window procedure first chance to handle hit testing. if (GetWindow()->ShouldUseNativeFrame()) { @@ -705,7 +713,7 @@ static BOOL CALLBACK ClipDCToChild(HWND window, LPARAM param) { } } // namespace -void WindowWin::OnNCPaint(HRGN rgn) { +void NativeWindowWin::OnNCPaint(HRGN rgn) { // We only do non-client painting if we're not using the native frame. // It's required to avoid some native painting artifacts from appearing when // the window is resized. @@ -788,45 +796,47 @@ void WindowWin::OnNCPaint(HRGN rgn) { SetMsgHandled(!GetWindow()->ShouldUseNativeFrame()); } -LRESULT WindowWin::OnNCUAHDrawCaption(UINT msg, WPARAM w_param, - LPARAM l_param) { +LRESULT NativeWindowWin::OnNCUAHDrawCaption(UINT msg, + WPARAM w_param, + LPARAM l_param) { // See comment in widget_win.h at the definition of WM_NCUAHDRAWCAPTION for // an explanation about why we need to handle this message. SetMsgHandled(!GetWindow()->ShouldUseNativeFrame()); return 0; } -LRESULT WindowWin::OnNCUAHDrawFrame(UINT msg, WPARAM w_param, - LPARAM l_param) { +LRESULT NativeWindowWin::OnNCUAHDrawFrame(UINT msg, + WPARAM w_param, + LPARAM l_param) { // See comment in widget_win.h at the definition of WM_NCUAHDRAWCAPTION for // an explanation about why we need to handle this message. SetMsgHandled(!GetWindow()->ShouldUseNativeFrame()); return 0; } -LRESULT WindowWin::OnSetCursor(UINT msg, - WPARAM w_param, - LPARAM l_param) { +LRESULT NativeWindowWin::OnSetCursor(UINT msg, + WPARAM w_param, + LPARAM l_param) { // This shouldn't hurt even if we're using the native frame. ScopedRedrawLock lock(this); return DefWindowProc(GetNativeView(), msg, w_param, l_param); } -LRESULT WindowWin::OnSetIcon(UINT size_type, HICON new_icon) { +LRESULT NativeWindowWin::OnSetIcon(UINT size_type, HICON new_icon) { // This shouldn't hurt even if we're using the native frame. ScopedRedrawLock lock(this); return DefWindowProc(GetNativeView(), WM_SETICON, size_type, reinterpret_cast<LPARAM>(new_icon)); } -LRESULT WindowWin::OnSetText(const wchar_t* text) { +LRESULT NativeWindowWin::OnSetText(const wchar_t* text) { // This shouldn't hurt even if we're using the native frame. ScopedRedrawLock lock(this); return DefWindowProc(GetNativeView(), WM_SETTEXT, NULL, reinterpret_cast<LPARAM>(text)); } -void WindowWin::OnSettingChange(UINT flags, const wchar_t* section) { +void NativeWindowWin::OnSettingChange(UINT flags, const wchar_t* section) { if (!GetParent() && (flags == SPI_SETWORKAREA)) { // Fire a dummy SetWindowPos() call, so we'll trip the code in // OnWindowPosChanging() below that notices work area changes. @@ -838,7 +848,7 @@ void WindowWin::OnSettingChange(UINT flags, const wchar_t* section) { } } -void WindowWin::OnSize(UINT size_param, const CSize& new_size) { +void NativeWindowWin::OnSize(UINT size_param, const CSize& new_size) { delegate_->OnNativeWindowBoundsChanged(); RedrawWindow(GetNativeView(), NULL, NULL, RDW_INVALIDATE | RDW_ALLCHILDREN); @@ -847,7 +857,7 @@ void WindowWin::OnSize(UINT size_param, const CSize& new_size) { ResetWindowRegion(false); } -void WindowWin::OnSysCommand(UINT notification_code, CPoint click) { +void NativeWindowWin::OnSysCommand(UINT notification_code, CPoint click) { // Windows uses the 4 lower order bits of |notification_code| for type- // specific information so we must exclude this when comparing. static const int sc_mask = 0xFFF0; @@ -894,7 +904,7 @@ void WindowWin::OnSysCommand(UINT notification_code, CPoint click) { } } -void WindowWin::OnWindowPosChanging(WINDOWPOS* window_pos) { +void NativeWindowWin::OnWindowPosChanging(WINDOWPOS* window_pos) { if (force_hidden_count_) { // Prevent the window from being made visible if we've been asked to do so. // See comment in header as to why we might want this. @@ -954,7 +964,7 @@ void WindowWin::OnWindowPosChanging(WINDOWPOS* window_pos) { DCHECK(ignore_pos_changes_factory_.empty()); MessageLoop::current()->PostTask(FROM_HERE, ignore_pos_changes_factory_.NewRunnableMethod( - &WindowWin::StopIgnoringPosChanges)); + &NativeWindowWin::StopIgnoringPosChanges)); } last_monitor_ = monitor; last_monitor_rect_ = monitor_rect; @@ -965,7 +975,7 @@ void WindowWin::OnWindowPosChanging(WINDOWPOS* window_pos) { NativeWidgetWin::OnWindowPosChanging(window_pos); } -void WindowWin::Close() { +void NativeWindowWin::Close() { NativeWidgetWin::Close(); // If the user activates another app after opening us, then comes back and @@ -985,7 +995,7 @@ void WindowWin::Close() { } } -void WindowWin::SetInitialFocus() { +void NativeWindowWin::SetInitialFocus() { if (!focus_on_creation_) return; @@ -1000,25 +1010,25 @@ void WindowWin::SetInitialFocus() { } //////////////////////////////////////////////////////////////////////////////// -// WindowWin, NativeWindow implementation: +// NativeWindowWin, NativeWindow implementation: -Window* WindowWin::GetWindow() { +Window* NativeWindowWin::GetWindow() { return delegate_->AsWindow(); } -const Window* WindowWin::GetWindow() const { +const Window* NativeWindowWin::GetWindow() const { return delegate_->AsWindow(); } -NativeWidget* WindowWin::AsNativeWidget() { +NativeWidget* NativeWindowWin::AsNativeWidget() { return this; } -const NativeWidget* WindowWin::AsNativeWidget() const { +const NativeWidget* NativeWindowWin::AsNativeWidget() const { return this; } -gfx::Rect WindowWin::GetRestoredBounds() const { +gfx::Rect NativeWindowWin::GetRestoredBounds() const { // If we're in fullscreen mode, we've changed the normal bounds to the monitor // rect, so return the saved bounds instead. if (IsFullscreen()) @@ -1029,7 +1039,7 @@ gfx::Rect WindowWin::GetRestoredBounds() const { return bounds; } -void WindowWin::ShowNativeWindow(ShowState state) { +void NativeWindowWin::ShowNativeWindow(ShowState state) { DWORD native_show_state; switch (state) { case SHOW_INACTIVE: @@ -1045,7 +1055,7 @@ void WindowWin::ShowNativeWindow(ShowState state) { Show(native_show_state); } -void WindowWin::BecomeModal() { +void NativeWindowWin::BecomeModal() { // We implement modality by crawling up the hierarchy of windows starting // at the owner, disabling all of them so that they don't receive input // messages. @@ -1056,15 +1066,15 @@ void WindowWin::BecomeModal() { } } -void WindowWin::CenterWindow(const gfx::Size& size) { +void NativeWindowWin::CenterWindow(const gfx::Size& size) { HWND parent = GetParent(); if (!IsWindow()) parent = GetOwner(GetNativeView()); ui::CenterAndSizeWindow(parent, GetNativeView(), size, false); } -void WindowWin::GetWindowBoundsAndMaximizedState(gfx::Rect* bounds, - bool* maximized) const { +void NativeWindowWin::GetWindowBoundsAndMaximizedState(gfx::Rect* bounds, + bool* maximized) const { WINDOWPLACEMENT wp; wp.length = sizeof(wp); const bool succeeded = !!GetWindowPlacement(GetNativeView(), &wp); @@ -1086,20 +1096,20 @@ void WindowWin::GetWindowBoundsAndMaximizedState(gfx::Rect* bounds, *maximized = (wp.showCmd == SW_SHOWMAXIMIZED); } -void WindowWin::EnableClose(bool enable) { +void NativeWindowWin::EnableClose(bool enable) { // Disable the native frame's close button regardless of whether or not the // native frame is in use, since this also affects the system menu. EnableMenuItem(GetSystemMenu(GetNativeView(), false), SC_CLOSE, enable); SendFrameChanged(GetNativeView()); } -void WindowWin::SetWindowTitle(const std::wstring& title) { +void NativeWindowWin::SetWindowTitle(const std::wstring& title) { SetWindowText(GetNativeView(), title.c_str()); SetAccessibleName(title); } -void WindowWin::SetWindowIcons(const SkBitmap& window_icon, - const SkBitmap& app_icon) { +void NativeWindowWin::SetWindowIcons(const SkBitmap& window_icon, + const SkBitmap& app_icon) { if (!window_icon.isNull()) { HICON windows_icon = IconUtil::CreateHICONFromSkBitmap(window_icon); // We need to make sure to destroy the previous icon, otherwise we'll leak @@ -1120,7 +1130,7 @@ void WindowWin::SetWindowIcons(const SkBitmap& window_icon, } } -void WindowWin::SetAccessibleName(const std::wstring& name) { +void NativeWindowWin::SetAccessibleName(const std::wstring& name) { base::win::ScopedComPtr<IAccPropServices> pAccPropServices; HRESULT hr = CoCreateInstance(CLSID_AccPropServices, NULL, CLSCTX_SERVER, IID_IAccPropServices, reinterpret_cast<void**>(&pAccPropServices)); @@ -1133,7 +1143,7 @@ void WindowWin::SetAccessibleName(const std::wstring& name) { } } -void WindowWin::SetAccessibleRole(ui::AccessibilityTypes::Role role) { +void NativeWindowWin::SetAccessibleRole(ui::AccessibilityTypes::Role role) { base::win::ScopedComPtr<IAccPropServices> pAccPropServices; HRESULT hr = CoCreateInstance(CLSID_AccPropServices, NULL, CLSCTX_SERVER, IID_IAccPropServices, reinterpret_cast<void**>(&pAccPropServices)); @@ -1148,7 +1158,7 @@ void WindowWin::SetAccessibleRole(ui::AccessibilityTypes::Role role) { } } -void WindowWin::SetAccessibleState(ui::AccessibilityTypes::State state) { +void NativeWindowWin::SetAccessibleState(ui::AccessibilityTypes::State state) { base::win::ScopedComPtr<IAccPropServices> pAccPropServices; HRESULT hr = CoCreateInstance(CLSID_AccPropServices, NULL, CLSCTX_SERVER, IID_IAccPropServices, reinterpret_cast<void**>(&pAccPropServices)); @@ -1162,18 +1172,18 @@ void WindowWin::SetAccessibleState(ui::AccessibilityTypes::State state) { } } -void WindowWin::SetWindowBounds(const gfx::Rect& bounds, - gfx::NativeWindow other_window) { +void NativeWindowWin::SetWindowBounds(const gfx::Rect& bounds, + gfx::NativeWindow other_window) { SetChildBounds(GetNativeView(), GetParent(), other_window, bounds, kMonitorEdgePadding, 0); } -void WindowWin::HideWindow() { +void NativeWindowWin::HideWindow() { // We can just call the function implemented by the widget. Hide(); } -void WindowWin::Activate() { +void NativeWindowWin::Activate() { if (IsMinimized()) ::ShowWindow(GetNativeView(), SW_RESTORE); ::SetWindowPos(GetNativeView(), HWND_TOP, 0, 0, 0, 0, @@ -1181,41 +1191,41 @@ void WindowWin::Activate() { SetForegroundWindow(GetNativeView()); } -void WindowWin::Deactivate() { +void NativeWindowWin::Deactivate() { HWND hwnd = ::GetNextWindow(GetNativeView(), GW_HWNDNEXT); if (hwnd) ::SetForegroundWindow(hwnd); } -void WindowWin::Maximize() { +void NativeWindowWin::Maximize() { ExecuteSystemMenuCommand(SC_MAXIMIZE); } -void WindowWin::Minimize() { +void NativeWindowWin::Minimize() { ExecuteSystemMenuCommand(SC_MINIMIZE); } -void WindowWin::Restore() { +void NativeWindowWin::Restore() { ExecuteSystemMenuCommand(SC_RESTORE); } -bool WindowWin::IsActive() const { +bool NativeWindowWin::IsActive() const { return is_active_; } -bool WindowWin::IsVisible() const { +bool NativeWindowWin::IsVisible() const { return !!::IsWindowVisible(GetNativeView()); } -bool WindowWin::IsMaximized() const { +bool NativeWindowWin::IsMaximized() const { return !!::IsZoomed(GetNativeView()); } -bool WindowWin::IsMinimized() const { +bool NativeWindowWin::IsMinimized() const { return !!::IsIconic(GetNativeView()); } -void WindowWin::SetFullscreen(bool fullscreen) { +void NativeWindowWin::SetFullscreen(bool fullscreen) { if (fullscreen_ == fullscreen) return; // Nothing to do. @@ -1272,16 +1282,16 @@ void WindowWin::SetFullscreen(bool fullscreen) { PopForceHidden(); } -bool WindowWin::IsFullscreen() const { +bool NativeWindowWin::IsFullscreen() const { return fullscreen_; } -void WindowWin::SetAlwaysOnTop(bool always_on_top) { +void NativeWindowWin::SetAlwaysOnTop(bool always_on_top) { ::SetWindowPos(GetNativeView(), always_on_top ? HWND_TOPMOST : HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); } -void WindowWin::SetUseDragFrame(bool use_drag_frame) { +void NativeWindowWin::SetUseDragFrame(bool use_drag_frame) { if (use_drag_frame) { // Make the frame slightly transparent during the drag operation. drag_frame_saved_window_style_ = GetWindowLong(GWL_STYLE); @@ -1299,26 +1309,26 @@ void WindowWin::SetUseDragFrame(bool use_drag_frame) { } } -NonClientFrameView* WindowWin::CreateFrameViewForWindow() { +NonClientFrameView* NativeWindowWin::CreateFrameViewForWindow() { if (GetWindow()->ShouldUseNativeFrame()) return new NativeFrameView(GetWindow()); return new CustomFrameView(GetWindow()); } -void WindowWin::UpdateFrameAfterFrameChange() { +void NativeWindowWin::UpdateFrameAfterFrameChange() { // We've either gained or lost a custom window region, so reset it now. ResetWindowRegion(true); } -gfx::NativeWindow WindowWin::GetNativeWindow() const { +gfx::NativeWindow NativeWindowWin::GetNativeWindow() const { return GetNativeView(); } -bool WindowWin::ShouldUseNativeFrame() const { +bool NativeWindowWin::ShouldUseNativeFrame() const { return NativeWidgetWin::IsAeroGlassEnabled(); } -void WindowWin::FrameTypeChanged() { +void NativeWindowWin::FrameTypeChanged() { // Called when the frame type could possibly be changing (theme change or // DWM composition change). if (base::win::GetVersion() >= base::win::VERSION_VISTA) { @@ -1348,9 +1358,9 @@ void WindowWin::FrameTypeChanged() { } //////////////////////////////////////////////////////////////////////////////// -// WindowWin, private: +// NativeWindowWin, private: -void WindowWin::RestoreEnabledIfNecessary() { +void NativeWindowWin::RestoreEnabledIfNecessary() { if (delegate_->IsModal() && !restored_enabled_) { restored_enabled_ = true; // If we were run modally, we need to undo the disabled-ness we inflicted on @@ -1363,7 +1373,7 @@ void WindowWin::RestoreEnabledIfNecessary() { } } -DWORD WindowWin::CalculateWindowStyle() { +DWORD NativeWindowWin::CalculateWindowStyle() { DWORD window_styles = WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_SYSMENU | WS_CAPTION; bool can_resize = GetWindow()->window_delegate()->CanResize(); @@ -1384,22 +1394,22 @@ DWORD WindowWin::CalculateWindowStyle() { return window_styles; } -DWORD WindowWin::CalculateWindowExStyle() { +DWORD NativeWindowWin::CalculateWindowExStyle() { return delegate_->IsDialogBox() ? WS_EX_DLGMODALFRAME : 0; } -void WindowWin::LockUpdates() { +void NativeWindowWin::LockUpdates() { lock_updates_ = true; saved_window_style_ = GetWindowLong(GWL_STYLE); SetWindowLong(GWL_STYLE, saved_window_style_ & ~WS_VISIBLE); } -void WindowWin::UnlockUpdates() { +void NativeWindowWin::UnlockUpdates() { SetWindowLong(GWL_STYLE, saved_window_style_); lock_updates_ = false; } -void WindowWin::ResetWindowRegion(bool force) { +void NativeWindowWin::ResetWindowRegion(bool force) { // A native frame uses the native window region, and we don't want to mess // with it. if (GetWindow()->ShouldUseNativeFrame()) { @@ -1442,7 +1452,7 @@ void WindowWin::ResetWindowRegion(bool force) { DeleteObject(current_rgn); } -LRESULT WindowWin::CallDefaultNCActivateHandler(BOOL active) { +LRESULT NativeWindowWin::CallDefaultNCActivateHandler(BOOL active) { // The DefWindowProc handling for WM_NCACTIVATE renders the classic-look // window title bar directly, so we need to use a redraw lock here to prevent // it from doing so. @@ -1450,7 +1460,7 @@ LRESULT WindowWin::CallDefaultNCActivateHandler(BOOL active) { return DefWindowProc(GetNativeView(), WM_NCACTIVATE, active, 0); } -void WindowWin::ExecuteSystemMenuCommand(int command) { +void NativeWindowWin::ExecuteSystemMenuCommand(int command) { if (command) SendMessage(GetNativeView(), WM_SYSCOMMAND, command, 0); } @@ -1461,7 +1471,7 @@ void WindowWin::ExecuteSystemMenuCommand(int command) { // static NativeWindow* NativeWindow::CreateNativeWindow( internal::NativeWindowDelegate* delegate) { - return new WindowWin(delegate); + return new NativeWindowWin(delegate); } } // namespace views diff --git a/views/window/window_win.h b/views/window/native_window_win.h index 286c3a0..7587832 100644 --- a/views/window/window_win.h +++ b/views/window/native_window_win.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef VIEWS_WINDOW_WINDOW_WIN_H_ -#define VIEWS_WINDOW_WINDOW_WIN_H_ +#ifndef VIEWS_WINDOW_NATIVE_WINDOW_WIN_H_ +#define VIEWS_WINDOW_NATIVE_WINDOW_WIN_H_ #pragma once #include "views/widget/native_widget_win.h" @@ -34,18 +34,18 @@ class WindowDelegate; //////////////////////////////////////////////////////////////////////////////// // -// WindowWin +// NativeWindowWin // -// A WindowWin is a NativeWidgetWin that encapsulates a window with a frame. -// The frame may or may not be rendered by the operating system. The window may -// or may not be top level. +// A NativeWindowWin is a NativeWidgetWin that encapsulates a window with a +// frame. The frame may or may not be rendered by the operating system. The +// window may or may not be top level. // //////////////////////////////////////////////////////////////////////////////// -class WindowWin : public NativeWidgetWin, - public NativeWindow { +class NativeWindowWin : public NativeWidgetWin, + public NativeWindow { public: - explicit WindowWin(internal::NativeWindowDelegate* delegate); - virtual ~WindowWin(); + explicit NativeWindowWin(internal::NativeWindowDelegate* delegate); + virtual ~NativeWindowWin(); // Show the window with the specified show command. void Show(int show_state); @@ -248,7 +248,7 @@ class WindowWin : public NativeWidgetWin, // The following factory is used to ignore SetWindowPos() calls for short time // periods. - ScopedRunnableMethodFactory<WindowWin> ignore_pos_changes_factory_; + ScopedRunnableMethodFactory<NativeWindowWin> ignore_pos_changes_factory_; // If this is greater than zero, we should prevent attempts to make the window // visible when we handle WM_WINDOWPOSCHANGING. Some calls like @@ -269,9 +269,9 @@ class WindowWin : public NativeWidgetWin, DWORD drag_frame_saved_window_style_; DWORD drag_frame_saved_window_ex_style_; - DISALLOW_COPY_AND_ASSIGN(WindowWin); + DISALLOW_COPY_AND_ASSIGN(NativeWindowWin); }; } // namespace views -#endif // VIEWS_WINDOW_WINDOW_WIN_H_ +#endif // VIEWS_WINDOW_NATIVE_WINDOW_WIN_H_ diff --git a/views/window/window_win_unittest.cc b/views/window/native_window_win_unittest.cc index 7cdc913..a612af5 100644 --- a/views/window/window_win_unittest.cc +++ b/views/window/native_window_win_unittest.cc @@ -2,14 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "views/window/window_win.h" +#include "views/window/native_window_win.h" #include "testing/gtest/include/gtest/gtest.h" #include "ui/gfx/rect.h" namespace views { -TEST(WindowWinTest, EnsureRectIsVisibleInRect) { +TEST(NativeWindowWinTest, EnsureRectIsVisibleInRect) { gfx::Rect parent_rect(0, 0, 500, 400); { |