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

Side by Side Diff: chrome/browser/ui/views/tab_contents/tab_contents_container.h

Issue 9015022: Replace most of Browser::GetSelectedTabContents calls into Browser::GetSelectedWebContents. I've ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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_VIEWS_TAB_CONTENTS_TAB_CONTENTS_CONTAINER_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_TAB_CONTENTS_TAB_CONTENTS_CONTAINER_H_
6 #define CHROME_BROWSER_UI_VIEWS_TAB_CONTENTS_TAB_CONTENTS_CONTAINER_H_ 6 #define CHROME_BROWSER_UI_VIEWS_TAB_CONTENTS_TAB_CONTENTS_CONTAINER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "chrome/browser/ui/views/tab_contents/native_tab_contents_container.h" 9 #include "chrome/browser/ui/views/tab_contents/native_tab_contents_container.h"
10 #include "content/public/browser/notification_observer.h" 10 #include "content/public/browser/notification_observer.h"
11 #include "content/public/browser/notification_registrar.h" 11 #include "content/public/browser/notification_registrar.h"
12 #include "ui/views/view.h" 12 #include "ui/views/view.h"
13 13
14 class NativeTabContentsContainer; 14 class NativeTabContentsContainer;
15 class RenderViewHost; 15 class RenderViewHost;
16 class RenderWidgetHostView; 16 class RenderWidgetHostView;
17 class TabContents;
18 17
19 namespace content { 18 namespace content {
20 class WebContents; 19 class WebContents;
21 } 20 }
22 21
23 class TabContentsContainer : public views::View, 22 class TabContentsContainer : public views::View,
24 public content::NotificationObserver { 23 public content::NotificationObserver {
25 public: 24 public:
26 TabContentsContainer(); 25 TabContentsContainer();
27 virtual ~TabContentsContainer(); 26 virtual ~TabContentsContainer();
28 27
29 // Changes the TabContents associated with this view. 28 // Changes the WebContents associated with this view.
30 void ChangeTabContents(TabContents* contents); 29 void ChangeWebContents(content::WebContents* contents);
31 30
32 View* GetFocusView() { return native_container_->GetView(); } 31 View* GetFocusView() { return native_container_->GetView(); }
33 32
34 // TODO(jam): move web_contents() to header. 33 // TODO(jam): move web_contents() to header.
35 content::WebContents* web_contents(); 34 content::WebContents* web_contents();
36 35
37 // Called by the BrowserView to notify that |contents| got the focus. 36 // Called by the BrowserView to notify that |contents| got the focus.
38 void WebContentsFocused(content::WebContents* contents); 37 void WebContentsFocused(content::WebContents* contents);
39 38
40 // Tells the container to update less frequently during resizing operations 39 // Tells the container to update less frequently during resizing operations
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 // get notified. 76 // get notified.
78 void TabContentsDestroyed(content::WebContents* contents); 77 void TabContentsDestroyed(content::WebContents* contents);
79 78
80 // Called when the RenderWidgetHostView of the hosted TabContents has changed. 79 // Called when the RenderWidgetHostView of the hosted TabContents has changed.
81 void RenderWidgetHostViewChanged(RenderWidgetHostView* new_view); 80 void RenderWidgetHostViewChanged(RenderWidgetHostView* new_view);
82 81
83 // An instance of a NativeTabContentsContainer object that holds the native 82 // An instance of a NativeTabContentsContainer object that holds the native
84 // view handle associated with the attached TabContents. 83 // view handle associated with the attached TabContents.
85 NativeTabContentsContainer* native_container_; 84 NativeTabContentsContainer* native_container_;
86 85
87 // The attached TabContents. 86 // The attached WebContents.
88 TabContents* tab_contents_; 87 content::WebContents* web_contents_;
89 88
90 // Handles registering for our notifications. 89 // Handles registering for our notifications.
91 content::NotificationRegistrar registrar_; 90 content::NotificationRegistrar registrar_;
92 91
93 // The current reserved rect in view coordinates where contents should not be 92 // The current reserved rect in view coordinates where contents should not be
94 // rendered to draw the resize corner, sidebar mini tabs etc. 93 // rendered to draw the resize corner, sidebar mini tabs etc.
95 // Cached here to update ever changing renderers. 94 // Cached here to update ever changing renderers.
96 gfx::Rect cached_reserved_rect_; 95 gfx::Rect cached_reserved_rect_;
97 96
98 DISALLOW_COPY_AND_ASSIGN(TabContentsContainer); 97 DISALLOW_COPY_AND_ASSIGN(TabContentsContainer);
99 }; 98 };
100 99
101 #endif // CHROME_BROWSER_UI_VIEWS_TAB_CONTENTS_TAB_CONTENTS_CONTAINER_H_ 100 #endif // CHROME_BROWSER_UI_VIEWS_TAB_CONTENTS_TAB_CONTENTS_CONTAINER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698