| OLD | NEW |
| 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_NOTIFICATIONS_BALLOON_HOST_H_ | 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_BALLOON_HOST_H_ |
| 6 #define CHROME_BROWSER_NOTIFICATIONS_BALLOON_HOST_H_ | 6 #define CHROME_BROWSER_NOTIFICATIONS_BALLOON_HOST_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 virtual const GURL& GetURL() const OVERRIDE; | 54 virtual const GURL& GetURL() const OVERRIDE; |
| 55 virtual void Close(RenderViewHost* render_view_host) OVERRIDE; | 55 virtual void Close(RenderViewHost* render_view_host) OVERRIDE; |
| 56 virtual void RenderViewCreated(RenderViewHost* render_view_host) OVERRIDE; | 56 virtual void RenderViewCreated(RenderViewHost* render_view_host) OVERRIDE; |
| 57 virtual void RenderViewReady(RenderViewHost* render_view_host) OVERRIDE; | 57 virtual void RenderViewReady(RenderViewHost* render_view_host) OVERRIDE; |
| 58 virtual void RenderViewGone(RenderViewHost* render_view_host, | 58 virtual void RenderViewGone(RenderViewHost* render_view_host, |
| 59 base::TerminationStatus status, | 59 base::TerminationStatus status, |
| 60 int error_code) OVERRIDE; | 60 int error_code) OVERRIDE; |
| 61 virtual ViewType::Type GetRenderViewType() const OVERRIDE; | 61 virtual ViewType::Type GetRenderViewType() const OVERRIDE; |
| 62 virtual RenderViewHostDelegate::View* GetViewDelegate() OVERRIDE; | 62 virtual RenderViewHostDelegate::View* GetViewDelegate() OVERRIDE; |
| 63 virtual void HandleMouseDown() OVERRIDE; | 63 virtual void HandleMouseDown() OVERRIDE; |
| 64 virtual RendererPreferences GetRendererPrefs( |
| 65 content::BrowserContext* browser_context) const OVERRIDE; |
| 64 | 66 |
| 65 // RenderViewHostDelegate::View methods. Only the ones for opening new | 67 // RenderViewHostDelegate::View methods. Only the ones for opening new |
| 66 // windows are currently implemented. | 68 // windows are currently implemented. |
| 67 virtual void CreateNewWindow( | 69 virtual void CreateNewWindow( |
| 68 int route_id, | 70 int route_id, |
| 69 const ViewHostMsg_CreateWindow_Params& params); | 71 const ViewHostMsg_CreateWindow_Params& params) OVERRIDE; |
| 70 virtual void CreateNewWidget(int route_id, WebKit::WebPopupType popup_type) {} | 72 virtual void CreateNewWidget(int route_id, |
| 71 virtual void CreateNewFullscreenWidget(int route_id) {} | 73 WebKit::WebPopupType popup_type) OVERRIDE {} |
| 74 virtual void CreateNewFullscreenWidget(int route_id) OVERRIDE {} |
| 72 virtual void ShowCreatedWindow(int route_id, | 75 virtual void ShowCreatedWindow(int route_id, |
| 73 WindowOpenDisposition disposition, | 76 WindowOpenDisposition disposition, |
| 74 const gfx::Rect& initial_pos, | 77 const gfx::Rect& initial_pos, |
| 75 bool user_gesture); | 78 bool user_gesture) OVERRIDE; |
| 76 virtual void ShowCreatedWidget(int route_id, | 79 virtual void ShowCreatedWidget(int route_id, |
| 77 const gfx::Rect& initial_pos) {} | 80 const gfx::Rect& initial_pos) OVERRIDE {} |
| 78 virtual void ShowCreatedFullscreenWidget(int route_id) {} | 81 virtual void ShowCreatedFullscreenWidget(int route_id) OVERRIDE {} |
| 79 virtual void ShowContextMenu(const ContextMenuParams& params) {} | 82 virtual void ShowContextMenu(const ContextMenuParams& params) OVERRIDE {} |
| 80 virtual void ShowPopupMenu(const gfx::Rect& bounds, | 83 virtual void ShowPopupMenu(const gfx::Rect& bounds, |
| 81 int item_height, | 84 int item_height, |
| 82 double item_font_size, | 85 double item_font_size, |
| 83 int selected_item, | 86 int selected_item, |
| 84 const std::vector<WebMenuItem>& items, | 87 const std::vector<WebMenuItem>& items, |
| 85 bool right_aligned) {} | 88 bool right_aligned) OVERRIDE {} |
| 86 virtual void StartDragging(const WebDropData& drop_data, | |
| 87 WebKit::WebDragOperationsMask allowed_ops) {} | |
| 88 virtual void StartDragging(const WebDropData&, | 89 virtual void StartDragging(const WebDropData&, |
| 89 WebKit::WebDragOperationsMask, | 90 WebKit::WebDragOperationsMask, |
| 90 const SkBitmap&, | 91 const SkBitmap&, |
| 91 const gfx::Point&) {} | 92 const gfx::Point&) OVERRIDE {} |
| 92 virtual void UpdateDragCursor(WebKit::WebDragOperation operation) {} | 93 virtual void UpdateDragCursor(WebKit::WebDragOperation operation) OVERRIDE {} |
| 93 virtual void GotFocus() {} | 94 virtual void GotFocus() OVERRIDE {} |
| 94 virtual void TakeFocus(bool reverse) {} | 95 virtual void TakeFocus(bool reverse) OVERRIDE {} |
| 95 virtual void UpdatePreferredSize(const gfx::Size& pref_size); | 96 virtual void UpdatePreferredSize(const gfx::Size& pref_size) OVERRIDE; |
| 96 virtual RendererPreferences GetRendererPrefs(Profile* profile) const; | |
| 97 | 97 |
| 98 // Enable Web UI. This has to be called before renderer is created. | 98 // Enable Web UI. This has to be called before renderer is created. |
| 99 void EnableWebUI(); | 99 void EnableWebUI(); |
| 100 | 100 |
| 101 // Returns whether the associated render view is ready. Used only for testing. | 101 // Returns whether the associated render view is ready. Used only for testing. |
| 102 bool IsRenderViewReady() const; | 102 bool IsRenderViewReady() const; |
| 103 | 103 |
| 104 protected: | 104 protected: |
| 105 virtual ~BalloonHost(); | 105 virtual ~BalloonHost(); |
| 106 // Must override in platform specific implementations. | 106 // Must override in platform specific implementations. |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 // Common implementations of some RenderViewHostDelegate::View methods. | 138 // Common implementations of some RenderViewHostDelegate::View methods. |
| 139 RenderViewHostDelegateViewHelper delegate_view_helper_; | 139 RenderViewHostDelegateViewHelper delegate_view_helper_; |
| 140 | 140 |
| 141 // A flag to enable Web UI. | 141 // A flag to enable Web UI. |
| 142 bool enable_web_ui_; | 142 bool enable_web_ui_; |
| 143 | 143 |
| 144 ExtensionFunctionDispatcher extension_function_dispatcher_; | 144 ExtensionFunctionDispatcher extension_function_dispatcher_; |
| 145 }; | 145 }; |
| 146 | 146 |
| 147 #endif // CHROME_BROWSER_NOTIFICATIONS_BALLOON_HOST_H_ | 147 #endif // CHROME_BROWSER_NOTIFICATIONS_BALLOON_HOST_H_ |
| OLD | NEW |