OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_CHROMEOS_MAIN_MENU_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_MAIN_MENU_H_ |
6 #define CHROME_BROWSER_CHROMEOS_MAIN_MENU_H_ | 6 #define CHROME_BROWSER_CHROMEOS_MAIN_MENU_H_ |
7 | 7 |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 | 9 |
10 #include "base/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
11 #include "base/singleton.h" | 11 #include "base/singleton.h" |
12 #include "base/task.h" | 12 #include "base/task.h" |
13 #include "chrome/browser/renderer_host/render_view_host_delegate.h" | 13 #include "chrome/browser/renderer_host/render_view_host_delegate.h" |
14 #include "chrome/browser/tab_contents/render_view_host_delegate_helper.h" | 14 #include "chrome/browser/tab_contents/render_view_host_delegate_helper.h" |
15 #include "chrome/browser/tab_contents/tab_contents_delegate.h" | 15 #include "chrome/browser/tab_contents/tab_contents_delegate.h" |
16 | 16 |
17 class Browser; | 17 class Browser; |
18 class RenderWidgetHostViewGtk; | 18 class RenderWidgetHostViewGtk; |
19 class SiteInstance; | 19 class SiteInstance; |
20 | 20 |
21 namespace gfx { | 21 namespace gfx { |
22 class Size; | 22 class Size; |
23 } | 23 } |
24 namespace views { | 24 namespace views { |
25 class WidgetGtk; | 25 class WidgetGtk; |
26 } | 26 } |
27 | 27 |
| 28 namespace chromeos { |
| 29 |
28 // MainMenu manages showing the main menu. The menu is currently an HTML page. | 30 // MainMenu manages showing the main menu. The menu is currently an HTML page. |
29 // When the user clicks a link on the page a new tab is added to the current | 31 // When the user clicks a link on the page a new tab is added to the current |
30 // browser and the menu is hidden. | 32 // browser and the menu is hidden. |
31 // | 33 // |
32 // To show the menu invoke Show. | 34 // To show the menu invoke Show. |
33 // | 35 // |
34 // MainMenu creates a RenderViewHost and corresponding RenderWidgetHostView | 36 // MainMenu creates a RenderViewHost and corresponding RenderWidgetHostView |
35 // to display the html page. MainMenu acts as the RenderViewHostDelegate for | 37 // to display the html page. MainMenu acts as the RenderViewHostDelegate for |
36 // the RenderViewHost. Clicking on a link results in creating a new | 38 // the RenderViewHost. Clicking on a link results in creating a new |
37 // TabContents (assigned to pending_contents_). One of two things can then | 39 // TabContents (assigned to pending_contents_). One of two things can then |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 scoped_ptr<TabContents> pending_contents_; | 196 scoped_ptr<TabContents> pending_contents_; |
195 | 197 |
196 ScopedRunnableMethodFactory<MainMenu> method_factory_; | 198 ScopedRunnableMethodFactory<MainMenu> method_factory_; |
197 | 199 |
198 // True if the popup has ever been shown. | 200 // True if the popup has ever been shown. |
199 bool has_shown_; | 201 bool has_shown_; |
200 | 202 |
201 DISALLOW_COPY_AND_ASSIGN(MainMenu); | 203 DISALLOW_COPY_AND_ASSIGN(MainMenu); |
202 }; | 204 }; |
203 | 205 |
204 #endif // CHROME_BROWSER_CHROMEOS_CHROMEOS_VERSION_LOADER_H_ | 206 } // namespace chromeos |
| 207 |
| 208 #endif // CHROME_BROWSER_CHROMEOS_MAIN_MENU_H_ |
OLD | NEW |