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

Side by Side Diff: chrome/browser/ui/views/apps/shaped_app_window_targeter_unittest.cc

Issue 616253002: Extract NativeAppWindow from src/extensions Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: might fix athena. similarity=33 Created 6 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/apps/shaped_app_window_targeter.h" 5 #include "chrome/browser/ui/views/apps/shaped_app_window_targeter.h"
6 6
7 #include "apps/ui/views/app_window_frame_view.h" 7 #include "apps/ui/views/app_window_frame_view.h"
8 #include "chrome/browser/ui/views/apps/chrome_native_app_window_views.h" 8 #include "chrome/browser/ui/views/apps/chrome_native_app_window_views.h"
9 #include "ui/aura/test/aura_test_base.h" 9 #include "ui/aura/test/aura_test_base.h"
10 #include "ui/aura/window.h" 10 #include "ui/aura/window.h"
11 #include "ui/aura/window_event_dispatcher.h" 11 #include "ui/aura/window_event_dispatcher.h"
12 #include "ui/views/controls/webview/webview.h" 12 #include "ui/views/controls/webview/webview.h"
13 #include "ui/wm/core/default_activation_client.h" 13 #include "ui/wm/core/default_activation_client.h"
14 #include "ui/wm/core/easy_resize_window_targeter.h" 14 #include "ui/wm/core/easy_resize_window_targeter.h"
15 15
16 class ShapedAppWindowTargeterTest : public aura::test::AuraTestBase { 16 class ShapedAppWindowTargeterTest : public aura::test::AuraTestBase {
17 public: 17 public:
18 ShapedAppWindowTargeterTest() 18 ShapedAppWindowTargeterTest() : web_view_(NULL), app_window_(NULL) {}
19 : web_view_(NULL) {
20 }
21 19
22 virtual ~ShapedAppWindowTargeterTest() {} 20 virtual ~ShapedAppWindowTargeterTest() {}
23 21
24 views::Widget* widget() { return widget_.get(); } 22 views::Widget* widget() { return widget_.get(); }
25 23
26 extensions::NativeAppWindow* app_window() { return &app_window_; } 24 native_app_window::NativeAppWindow* app_window() { return &app_window_; }
27 ChromeNativeAppWindowViews* app_window_views() { return &app_window_; } 25 ChromeNativeAppWindowViews* app_window_views() { return &app_window_; }
28 26
29 protected: 27 protected:
30 virtual void SetUp() OVERRIDE { 28 virtual void SetUp() OVERRIDE {
31 aura::test::AuraTestBase::SetUp(); 29 aura::test::AuraTestBase::SetUp();
32 new wm::DefaultActivationClient(root_window()); 30 new wm::DefaultActivationClient(root_window());
33 widget_.reset(new views::Widget); 31 widget_.reset(new views::Widget);
34 views::Widget::InitParams params(views::Widget::InitParams::TYPE_WINDOW); 32 views::Widget::InitParams params(views::Widget::InitParams::TYPE_WINDOW);
35 params.remove_standard_frame = true; 33 params.remove_standard_frame = true;
36 params.bounds = gfx::Rect(30, 30, 100, 100); 34 params.bounds = gfx::Rect(30, 30, 100, 100);
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 ui::MouseEvent move(ui::ET_MOUSE_MOVED, 244 ui::MouseEvent move(ui::ET_MOUSE_MOVED,
247 gfx::Point(32, 37), gfx::Point(32, 37), 245 gfx::Point(32, 37), gfx::Point(32, 37),
248 ui::EF_NONE, ui::EF_NONE); 246 ui::EF_NONE, ui::EF_NONE);
249 ui::EventDispatchDetails details = 247 ui::EventDispatchDetails details =
250 event_processor()->OnEventFromSource(&move); 248 event_processor()->OnEventFromSource(&move);
251 ASSERT_FALSE(details.dispatcher_destroyed); 249 ASSERT_FALSE(details.dispatcher_destroyed);
252 EXPECT_EQ(window, move.target()); 250 EXPECT_EQ(window, move.target());
253 } 251 }
254 #endif // defined (OS_CHROMEOS) 252 #endif // defined (OS_CHROMEOS)
255 } 253 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/apps/chrome_native_app_window_views_win.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698