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

Side by Side Diff: chrome/browser/tab_contents/chrome_web_contents_view_delegate_views.h

Issue 9959119: Revert 130442 - Adds a TabContentsViewAura. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 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
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_TAB_CONTENTS_CHROME_WEB_CONTENTS_VIEW_DELEGATE_VIEWS_H_
6 #define CHROME_BROWSER_TAB_CONTENTS_CHROME_WEB_CONTENTS_VIEW_DELEGATE_VIEWS_H_
7 #pragma once
8
9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "content/public/browser/web_contents_view_delegate.h"
13
14 class ConstrainedWindowViews;
15 class RenderViewContextMenuViews;
16
17 namespace content {
18 class WebContents;
19 class WebDragDestDelegate;
20 }
21
22 namespace views {
23 class FocusManager;
24 class Widget;
25 }
26
27 // A chrome specific class that extends TabContentsViewWin with features like
28 // constrained windows, which live in chrome.
29 class ChromeWebContentsViewDelegateViews
30 : public content::WebContentsViewDelegate {
31 public:
32 explicit ChromeWebContentsViewDelegateViews(
33 content::WebContents* web_contents);
34 virtual ~ChromeWebContentsViewDelegateViews();
35
36 // Overridden from WebContentsViewDelegate:
37 virtual content::WebDragDestDelegate* GetDragDestDelegate() OVERRIDE;
38 virtual void StoreFocus() OVERRIDE;
39 virtual void RestoreFocus() OVERRIDE;
40 virtual bool Focus() OVERRIDE;
41 virtual void TakeFocus(bool reverse) OVERRIDE;
42 virtual void ShowContextMenu(
43 const content::ContextMenuParams& params) OVERRIDE;
44 virtual void SizeChanged(const gfx::Size& size) OVERRIDE;
45
46 private:
47 views::Widget* GetTopLevelWidget();
48 views::FocusManager* GetFocusManager();
49 void SetInitialFocus();
50
51 // The id used in the ViewStorage to store the last focused view.
52 int last_focused_view_storage_id_;
53
54 // The context menu is reset every time we show it, but we keep a pointer to
55 // between uses so that it won't go out of scope before we're done with it.
56 scoped_ptr<RenderViewContextMenuViews> context_menu_;
57
58 // The chrome specific delegate that receives events from WebDragDest.
59 scoped_ptr<content::WebDragDestDelegate> bookmark_handler_;
60
61 content::WebContents* web_contents_;
62
63 DISALLOW_COPY_AND_ASSIGN(ChromeWebContentsViewDelegateViews);
64 };
65
66 #endif // CHROME_BROWSER_TAB_CONTENTS_CHROME_WEB_CONTENTS_VIEW_DELEGATE_VIEWS_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698