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

Side by Side Diff: chrome/browser/ui/panels/panel_browser_window_gtk.h

Issue 7605009: Implement drag and drop testing in a platform independent way. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed a build error on mac only. Created 9 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_WINDOW_GTK_H_ 5 #ifndef CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_WINDOW_GTK_H_
6 #define CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_WINDOW_GTK_H_ 6 #define CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_WINDOW_GTK_H_
7 7
8 #include "chrome/browser/ui/gtk/browser_window_gtk.h" 8 #include "chrome/browser/ui/gtk/browser_window_gtk.h"
9 #include "chrome/browser/ui/panels/native_panel.h" 9 #include "chrome/browser/ui/panels/native_panel.h"
10 10
11 class Panel; 11 class Panel;
12 class NativePanelTestingGtk;
12 13
13 class PanelBrowserWindowGtk : public BrowserWindowGtk, 14 class PanelBrowserWindowGtk : public BrowserWindowGtk,
14 public NativePanel, 15 public NativePanel,
15 public NativePanelTesting,
16 public MessageLoopForUI::Observer { 16 public MessageLoopForUI::Observer {
17 friend class NativePanelTestingGtk;
17 public: 18 public:
18 PanelBrowserWindowGtk(Browser* browser, Panel* panel, 19 PanelBrowserWindowGtk(Browser* browser, Panel* panel,
19 const gfx::Rect& bounds); 20 const gfx::Rect& bounds);
20 virtual ~PanelBrowserWindowGtk(); 21 virtual ~PanelBrowserWindowGtk();
21 22
22 // BrowserWindowGtk overrides 23 // BrowserWindowGtk overrides
23 virtual void Init() OVERRIDE; 24 virtual void Init() OVERRIDE;
24 25
25 // BrowserWindow overrides 26 // BrowserWindow overrides
26 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; 27 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;
(...skipping 24 matching lines...) Expand all
51 virtual bool IsPanelActive() const OVERRIDE; 52 virtual bool IsPanelActive() const OVERRIDE;
52 virtual gfx::NativeWindow GetNativePanelHandle() OVERRIDE; 53 virtual gfx::NativeWindow GetNativePanelHandle() OVERRIDE;
53 virtual void UpdatePanelTitleBar() OVERRIDE; 54 virtual void UpdatePanelTitleBar() OVERRIDE;
54 virtual void ShowTaskManagerForPanel() OVERRIDE; 55 virtual void ShowTaskManagerForPanel() OVERRIDE;
55 virtual FindBar* CreatePanelFindBar() OVERRIDE; 56 virtual FindBar* CreatePanelFindBar() OVERRIDE;
56 virtual void NotifyPanelOnUserChangedTheme() OVERRIDE; 57 virtual void NotifyPanelOnUserChangedTheme() OVERRIDE;
57 virtual void DrawAttention() OVERRIDE; 58 virtual void DrawAttention() OVERRIDE;
58 virtual bool IsDrawingAttention() const OVERRIDE; 59 virtual bool IsDrawingAttention() const OVERRIDE;
59 virtual Browser* GetPanelBrowser() const OVERRIDE; 60 virtual Browser* GetPanelBrowser() const OVERRIDE;
60 virtual void DestroyPanelBrowser() OVERRIDE; 61 virtual void DestroyPanelBrowser() OVERRIDE;
61 virtual NativePanelTesting* GetNativePanelTesting() OVERRIDE;
62 62
63 private: 63 private:
64 void SetBoundsImpl(); 64 void SetBoundsImpl();
65 65
66 // MessageLoop::Observer implementation: 66 // MessageLoop::Observer implementation:
67 virtual void WillProcessEvent(GdkEvent* event) OVERRIDE; 67 virtual void WillProcessEvent(GdkEvent* event) OVERRIDE;
68 virtual void DidProcessEvent(GdkEvent* event) OVERRIDE; 68 virtual void DidProcessEvent(GdkEvent* event) OVERRIDE;
69 69
70 void CreateDragWidget(); 70 void CreateDragWidget();
71 void DestroyDragWidget(); 71 void DestroyDragWidget();
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 // a task to end the drag and only run it if GTK+ didn't send us the 113 // a task to end the drag and only run it if GTK+ didn't send us the
114 // drag-failed event. 114 // drag-failed event.
115 ScopedRunnableMethodFactory<PanelBrowserWindowGtk> drag_end_factory_; 115 ScopedRunnableMethodFactory<PanelBrowserWindowGtk> drag_end_factory_;
116 116
117 scoped_ptr<Panel> panel_; 117 scoped_ptr<Panel> panel_;
118 gfx::Rect bounds_; 118 gfx::Rect bounds_;
119 DISALLOW_COPY_AND_ASSIGN(PanelBrowserWindowGtk); 119 DISALLOW_COPY_AND_ASSIGN(PanelBrowserWindowGtk);
120 }; 120 };
121 121
122 #endif // CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_WINDOW_GTK_H_ 122 #endif // CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_WINDOW_GTK_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/panel_browser_window_cocoa.mm ('k') | chrome/browser/ui/panels/panel_browser_window_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698