| Index: chrome/browser/ui/views/frame/browser_view.cc
|
| ===================================================================
|
| --- chrome/browser/ui/views/frame/browser_view.cc (revision 132062)
|
| +++ chrome/browser/ui/views/frame/browser_view.cc (working copy)
|
| @@ -93,6 +93,7 @@
|
| #include "ui/gfx/sys_color_change_listener.h"
|
| #include "ui/ui_controls/ui_controls.h"
|
| #include "ui/views/controls/single_split_view.h"
|
| +#include "ui/views/controls/webview/webview.h"
|
| #include "ui/views/events/event.h"
|
| #include "ui/views/focus/external_focus_tracker.h"
|
| #include "ui/views/focus/view_storage.h"
|
| @@ -1199,7 +1200,7 @@
|
| }
|
|
|
| void BrowserView::WebContentsFocused(WebContents* contents) {
|
| - contents_container_->WebContentsFocused(contents);
|
| + contents_container_->OnWebContentsFocused(contents);
|
| }
|
|
|
| void BrowserView::ShowPageInfo(Profile* profile,
|
| @@ -1313,9 +1314,9 @@
|
|
|
| void BrowserView::ShowInstant(TabContentsWrapper* preview) {
|
| if (!preview_container_)
|
| - preview_container_ = new TabContentsContainer();
|
| + preview_container_ = new views::WebView(browser_->profile());
|
| contents_->SetPreview(preview_container_, preview->web_contents());
|
| - preview_container_->ChangeWebContents(preview->web_contents());
|
| + preview_container_->SetWebContents(preview->web_contents());
|
| }
|
|
|
| void BrowserView::HideInstant() {
|
| @@ -1323,7 +1324,7 @@
|
| return;
|
|
|
| // The contents must be changed before SetPreview is invoked.
|
| - preview_container_->ChangeWebContents(NULL);
|
| + preview_container_->SetWebContents(NULL);
|
| contents_->SetPreview(NULL, NULL);
|
| delete preview_container_;
|
| preview_container_ = NULL;
|
| @@ -1371,7 +1372,7 @@
|
| }
|
|
|
| views::View* BrowserView::GetTabContentsContainerView() const {
|
| - return contents_container_->GetFocusView();
|
| + return contents_container_;
|
| }
|
|
|
| ToolbarView* BrowserView::GetToolbarView() const {
|
| @@ -1389,7 +1390,7 @@
|
| // We need to reset the current tab contents to NULL before it gets
|
| // freed. This is because the focus manager performs some operations
|
| // on the selected TabContents when it is removed.
|
| - contents_container_->ChangeWebContents(NULL);
|
| + contents_container_->SetWebContents(NULL);
|
| infobar_container_->ChangeTabContents(NULL);
|
| UpdateDevToolsForContents(NULL);
|
| }
|
| @@ -1421,9 +1422,9 @@
|
| // If 'preview' is becoming active, swap the 'active' and 'preview' and
|
| // delete what was the active.
|
| contents_->MakePreviewContentsActiveContents();
|
| - TabContentsContainer* old_container = contents_container_;
|
| + views::WebView* old_container = contents_container_;
|
| contents_container_ = preview_container_;
|
| - old_container->ChangeWebContents(NULL);
|
| + old_container->SetWebContents(NULL);
|
| delete old_container;
|
| preview_container_ = NULL;
|
| }
|
| @@ -1888,7 +1889,7 @@
|
| infobar_container_ = new InfoBarContainerView(this);
|
| AddChildView(infobar_container_);
|
|
|
| - contents_container_ = new TabContentsContainer;
|
| + contents_container_ = new views::WebView(browser_->profile());
|
| contents_ = new ContentsContainer(contents_container_);
|
|
|
| SkColor bg_color = GetWidget()->GetThemeProvider()->
|
| @@ -2402,7 +2403,7 @@
|
| // we don't want any TabContents to be attached, so that we
|
| // avoid an unnecessary resize and re-layout of a TabContents.
|
| if (change_tab_contents)
|
| - contents_container_->ChangeWebContents(NULL);
|
| + contents_container_->SetWebContents(NULL);
|
| infobar_container_->ChangeTabContents(new_contents->infobar_tab_helper());
|
| if (bookmark_bar_view_.get()) {
|
| bookmark_bar_view_->SetBookmarkBarState(
|
| @@ -2411,7 +2412,7 @@
|
| }
|
| UpdateUIForContents(new_contents);
|
| if (change_tab_contents)
|
| - contents_container_->ChangeWebContents(new_contents->web_contents());
|
| + contents_container_->SetWebContents(new_contents->web_contents());
|
|
|
| UpdateDevToolsForContents(new_contents);
|
| // TODO(beng): This should be called automatically by ChangeWebContents, but I
|
|
|