Commit d9828740 authored by ben@chromium.org's avatar ben@chromium.org

Revert 133467 - Convert the last users of DOMView to WebView.

Remove DOMView.

BUG=none
TEST=none
Review URL: https://chromiumcodereview.appspot.com/10171006

TBR=ben@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10204002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133529 0039d316-1c4b-4281-b951-d872f2087c98
parent b4c49e5e
...@@ -28,11 +28,14 @@ namespace chromeos { ...@@ -28,11 +28,14 @@ namespace chromeos {
// static // static
void ChooseMobileNetworkDialog::ShowDialog(gfx::NativeWindow owning_window) { void ChooseMobileNetworkDialog::ShowDialog(gfx::NativeWindow owning_window) {
views::Widget::CreateWindowWithParent( Profile* profile = ProfileManager::GetDefaultProfileOrOffTheRecord();
new HtmlDialogView(ProfileManager::GetDefaultProfileOrOffTheRecord(), HtmlDialogView* html_view =
new HtmlDialogView(profile,
BrowserList::GetLastActive(), BrowserList::GetLastActive(),
new ChooseMobileNetworkDialog), new ChooseMobileNetworkDialog);
owning_window)->Show(); html_view->InitDialog();
views::Widget::CreateWindowWithParent(html_view, owning_window);
html_view->GetWidget()->Show();
} }
ChooseMobileNetworkDialog::ChooseMobileNetworkDialog() { ChooseMobileNetworkDialog::ChooseMobileNetworkDialog() {
......
...@@ -20,8 +20,8 @@ namespace chromeos { ...@@ -20,8 +20,8 @@ namespace chromeos {
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// HTMLPageView // HTMLPageView
HTMLPageView::HTMLPageView(content::BrowserContext* browser_context) HTMLPageView::HTMLPageView()
: dom_view_(new WebPageDomView(browser_context)) { : dom_view_(new WebPageDomView()) {
} }
WebPageDomView* HTMLPageView::dom_view() { WebPageDomView* HTMLPageView::dom_view() {
...@@ -48,13 +48,13 @@ void HTMLPageScreen::Refresh() { ...@@ -48,13 +48,13 @@ void HTMLPageScreen::Refresh() {
StartTimeoutTimer(); StartTimeoutTimer();
GURL url(url_); GURL url(url_);
Profile* profile = ProfileManager::GetDefaultProfile(); Profile* profile = ProfileManager::GetDefaultProfile();
view()->InitWebView(SiteInstance::CreateForURL(profile, url)); view()->InitDOM(profile, SiteInstance::CreateForURL(profile, url));
view()->SetWebContentsDelegate(this); view()->SetWebContentsDelegate(this);
view()->LoadURL(url); view()->LoadURL(url);
} }
HTMLPageView* HTMLPageScreen::AllocateView() { HTMLPageView* HTMLPageScreen::AllocateView() {
return new HTMLPageView(ProfileManager::GetDefaultProfile()); return new HTMLPageView();
} }
void HTMLPageScreen::HandleKeyboardEvent(const NativeWebKeyboardEvent& event) { void HTMLPageScreen::HandleKeyboardEvent(const NativeWebKeyboardEvent& event) {
......
...@@ -22,7 +22,7 @@ class ViewScreenDelegate; ...@@ -22,7 +22,7 @@ class ViewScreenDelegate;
class HTMLPageView : public WebPageView { class HTMLPageView : public WebPageView {
public: public:
explicit HTMLPageView(content::BrowserContext* browser_context); HTMLPageView();
protected: protected:
virtual WebPageDomView* dom_view() OVERRIDE; virtual WebPageDomView* dom_view() OVERRIDE;
......
...@@ -56,9 +56,11 @@ LoginHtmlDialog::~LoginHtmlDialog() { ...@@ -56,9 +56,11 @@ LoginHtmlDialog::~LoginHtmlDialog() {
} }
void LoginHtmlDialog::Show() { void LoginHtmlDialog::Show() {
views::Widget::CreateWindowWithParent( HtmlDialogView* html_view =
new HtmlDialogView(ProfileManager::GetDefaultProfile(), NULL, this), new HtmlDialogView(ProfileManager::GetDefaultProfile(), NULL, this);
parent_window_)->Show(); views::Widget::CreateWindowWithParent(html_view, parent_window_);
html_view->InitDialog();
html_view->GetWidget()->Show();
is_open_ = true; is_open_ = true;
} }
......
...@@ -42,11 +42,6 @@ const char kRegistrationSkippedUrl[] = "cros://register/skipped"; ...@@ -42,11 +42,6 @@ const char kRegistrationSkippedUrl[] = "cros://register/skipped";
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// RegistrationView, protected: // RegistrationView, protected:
RegistrationView::RegistrationView(content::BrowserContext* browser_context)
: dom_view_(new WebPageDomView(browser_context)) {
}
WebPageDomView* RegistrationView::dom_view() { WebPageDomView* RegistrationView::dom_view() {
return dom_view_; return dom_view_;
} }
...@@ -76,13 +71,13 @@ void RegistrationScreen::Refresh() { ...@@ -76,13 +71,13 @@ void RegistrationScreen::Refresh() {
StartTimeoutTimer(); StartTimeoutTimer();
GURL url(kRegistrationHostPageUrl); GURL url(kRegistrationHostPageUrl);
Profile* profile = ProfileManager::GetDefaultProfile(); Profile* profile = ProfileManager::GetDefaultProfile();
view()->InitWebView(SiteInstance::CreateForURL(profile, url)); view()->InitDOM(profile, SiteInstance::CreateForURL(profile, url));
view()->SetWebContentsDelegate(this); view()->SetWebContentsDelegate(this);
view()->LoadURL(url); view()->LoadURL(url);
} }
RegistrationView* RegistrationScreen::AllocateView() { RegistrationView* RegistrationScreen::AllocateView() {
return new RegistrationView(ProfileManager::GetDefaultProfile()); return new RegistrationView();
} }
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
......
...@@ -31,7 +31,7 @@ class ViewScreenDelegate; ...@@ -31,7 +31,7 @@ class ViewScreenDelegate;
// Class that displays screen contents: page and throbber while waiting. // Class that displays screen contents: page and throbber while waiting.
class RegistrationView : public WebPageView { class RegistrationView : public WebPageView {
public: public:
explicit RegistrationView(content::BrowserContext* browser_context); RegistrationView() : dom_view_(new WebPageDomView()) {}
protected: protected:
virtual WebPageDomView* dom_view() OVERRIDE; virtual WebPageDomView* dom_view() OVERRIDE;
......
...@@ -51,13 +51,9 @@ const int kStopDelayMs = 500; ...@@ -51,13 +51,9 @@ const int kStopDelayMs = 500;
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// WebPageDomView, public: // WebPageDomView, public:
WebPageDomView::WebPageDomView(content::BrowserContext* browser_context)
: views::WebView(browser_context) {
}
void WebPageDomView::SetWebContentsDelegate( void WebPageDomView::SetWebContentsDelegate(
content::WebContentsDelegate* delegate) { content::WebContentsDelegate* delegate) {
web_contents()->SetDelegate(delegate); dom_contents_->web_contents()->SetDelegate(delegate);
} }
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
...@@ -93,12 +89,13 @@ void WebPageView::Init() { ...@@ -93,12 +89,13 @@ void WebPageView::Init() {
&WebPageView::ShowWaitingControls); &WebPageView::ShowWaitingControls);
} }
void WebPageView::InitWebView(SiteInstance* site_instance) { void WebPageView::InitDOM(Profile* profile,
dom_view()->CreateWebContentsWithSiteInstance(site_instance); SiteInstance* site_instance) {
dom_view()->Init(profile, site_instance);
} }
void WebPageView::LoadURL(const GURL& url) { void WebPageView::LoadURL(const GURL& url) {
dom_view()->LoadInitialURL(url); dom_view()->LoadURL(url);
} }
void WebPageView::SetWebContentsDelegate( void WebPageView::SetWebContentsDelegate(
......
...@@ -10,13 +10,12 @@ ...@@ -10,13 +10,12 @@
#include "base/compiler_specific.h" #include "base/compiler_specific.h"
#include "base/timer.h" #include "base/timer.h"
#include "ui/views/controls/webview/webview.h" #include "chrome/browser/ui/views/dom_view.h"
#include "ui/views/view.h" #include "ui/views/view.h"
class Profile; class Profile;
namespace content { namespace content {
class BrowserContext;
class SiteInstance; class SiteInstance;
class WebContentsDelegate; class WebContentsDelegate;
} }
...@@ -29,9 +28,9 @@ class Throbber; ...@@ -29,9 +28,9 @@ class Throbber;
namespace chromeos { namespace chromeos {
// WebPageDomView is the view that is rendering the page. // WebPageDomView is the view that is rendering the page.
class WebPageDomView : public views::WebView { class WebPageDomView : public DOMView {
public: public:
explicit WebPageDomView(content::BrowserContext* browser_context); WebPageDomView() {}
// Set delegate that will be notified about tab contents changes. // Set delegate that will be notified about tab contents changes.
void SetWebContentsDelegate(content::WebContentsDelegate* delegate); void SetWebContentsDelegate(content::WebContentsDelegate* delegate);
...@@ -50,9 +49,9 @@ class WebPageView : public views::View { ...@@ -50,9 +49,9 @@ class WebPageView : public views::View {
// Initialize view layout. // Initialize view layout.
void Init(); void Init();
// Initialize the WebView, creating the contents. This should be // Initialize the DOM view, creating the contents. This should be
// called once the view has been added to a container. // called once the view has been added to a container.
void InitWebView(content::SiteInstance* site_instance); void InitDOM(Profile* profile, content::SiteInstance* site_instance);
// Loads the given URL into the page. // Loads the given URL into the page.
// You must have previously called Init() and SetWebContentsDelegate. // You must have previously called Init() and SetWebContentsDelegate.
......
...@@ -47,11 +47,14 @@ namespace chromeos { ...@@ -47,11 +47,14 @@ namespace chromeos {
// static // static
void SimDialogDelegate::ShowDialog(gfx::NativeWindow owning_window, void SimDialogDelegate::ShowDialog(gfx::NativeWindow owning_window,
SimDialogMode mode) { SimDialogMode mode) {
views::Widget::CreateWindowWithParent( Profile* profile = ProfileManager::GetDefaultProfileOrOffTheRecord();
new HtmlDialogView(ProfileManager::GetDefaultProfileOrOffTheRecord(), HtmlDialogView* html_view =
new HtmlDialogView(profile,
BrowserList::GetLastActive(), BrowserList::GetLastActive(),
new SimDialogDelegate(mode)), new SimDialogDelegate(mode));
owning_window)->Show(); html_view->InitDialog();
views::Widget::CreateWindowWithParent(html_view, owning_window);
html_view->GetWidget()->Show();
} }
SimDialogDelegate::SimDialogDelegate(SimDialogMode dialog_mode) SimDialogDelegate::SimDialogDelegate(SimDialogMode dialog_mode)
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
#include "chrome/browser/profiles/profile_manager.h" #include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/ui/browser_dialogs.h" #include "chrome/browser/ui/browser_dialogs.h"
#include "chrome/browser/ui/browser_list.h" #include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/dialog_style.h" #include "chrome/browser/ui/dialog_style.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/common/chrome_switches.h" #include "chrome/common/chrome_switches.h"
...@@ -689,17 +688,27 @@ void CreateDialogImpl(const FilePath& path_to_file, ...@@ -689,17 +688,27 @@ void CreateDialogImpl(const FilePath& path_to_file,
path_to_file, width, height, std::string(), job_title, print_ticket, path_to_file, width, height, std::string(), job_title, print_ticket,
file_type, modal, delete_on_close, close_after_signin, file_type, modal, delete_on_close, close_after_signin,
callback); callback);
if (modal) {
DCHECK(browser);
#if defined(USE_AURA)
HtmlDialogView* html_view =
new HtmlDialogView(profile, browser, dialog_delegate);
views::Widget::CreateWindowWithParent(html_view,
browser->window()->GetNativeHandle());
html_view->InitDialog();
views::Widget* widget = html_view->GetWidget();
DCHECK(widget);
widget->Show();
#if defined(OS_WIN) #if defined(OS_WIN)
gfx::NativeWindow window = gfx::NativeWindow window = widget->GetNativeWindow();
#endif
#else
#if defined(OS_WIN)
gfx::NativeWindow window =
#endif
browser->BrowserShowHtmlDialog(dialog_delegate, NULL, STYLE_GENERIC);
#endif #endif
browser::ShowHtmlDialog(
modal ? browser->window()->GetNativeHandle() : NULL,
profile,
browser,
dialog_delegate,
STYLE_GENERIC);
#if defined(OS_WIN) #if defined(OS_WIN)
HWND dialog_handle; HWND dialog_handle;
#if defined(USE_AURA) #if defined(USE_AURA)
...@@ -707,9 +716,17 @@ void CreateDialogImpl(const FilePath& path_to_file, ...@@ -707,9 +716,17 @@ void CreateDialogImpl(const FilePath& path_to_file,
#else #else
dialog_handle = window; dialog_handle = window;
#endif #endif
if (::GetForegroundWindow() != dialog_handle) if (::GetForegroundWindow() != dialog_handle) {
ui::ForegroundHelper::SetForeground(dialog_handle); ui::ForegroundHelper::SetForeground(dialog_handle);
}
#endif #endif
} else {
browser::ShowHtmlDialog(NULL,
profile,
browser,
dialog_delegate,
STYLE_GENERIC);
}
} }
void CreateDialogSigninImpl(const base::Closure& callback) { void CreateDialogSigninImpl(const base::Closure& callback) {
......
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ui/views/dom_view.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/renderer_preferences_util.h"
#include "content/public/browser/site_instance.h"
#include "content/public/browser/web_contents.h"
#include "ui/views/focus/focus_manager.h"
using content::SiteInstance;
using content::WebContents;
// static
const char DOMView::kViewClassName[] =
"browser/ui/views/DOMView";
DOMView::DOMView() : initialized_(false) {
set_focusable(true);
}
DOMView::~DOMView() {
if (native_view())
Detach();
}
std::string DOMView::GetClassName() const {
return kViewClassName;
}
bool DOMView::Init(Profile* profile, SiteInstance* instance) {
if (initialized_)
return true;
initialized_ = true;
WebContents* web_contents = CreateTabContents(profile, instance);
dom_contents_.reset(new TabContentsWrapper(web_contents));
renderer_preferences_util::UpdateFromSystemSettings(
web_contents->GetMutableRendererPrefs(), profile);
// Attach the native_view now if the view is already added to Widget.
if (GetWidget())
AttachTabContents();
return true;
}
WebContents* DOMView::CreateTabContents(Profile* profile,
SiteInstance* instance) {
return WebContents::Create(profile, instance, MSG_ROUTING_NONE, NULL, NULL);
}
void DOMView::LoadURL(const GURL& url) {
DCHECK(initialized_);
dom_contents_->web_contents()->GetController().LoadURL(
url, content::Referrer(), content::PAGE_TRANSITION_START_PAGE,
std::string());
}
bool DOMView::SkipDefaultKeyEventProcessing(const views::KeyEvent& e) {
// Don't move the focus to the next view when tab is pressed, we want the
// key event to be propagated to the render view for doing the tab traversal
// there.
return views::FocusManager::IsTabTraversalKeyEvent(e);
}
void DOMView::OnFocus() {
dom_contents_->web_contents()->Focus();
}
void DOMView::ViewHierarchyChanged(bool is_add, views::View* parent,
views::View* child) {
// Attach the native_view when this is added to Widget if
// the native view has not been attached yet and tab_contents_ exists.
views::NativeViewHost::ViewHierarchyChanged(is_add, parent, child);
if (is_add && GetWidget() && !native_view() && dom_contents_.get())
AttachTabContents();
else if (!is_add && child == this && native_view())
Detach();
}
void DOMView::AttachTabContents() {
Attach(dom_contents_->web_contents()->GetNativeView());
}
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// DOMView is a ChromeView that displays the content of a web DOM.
// It should be used with data: URLs.
#ifndef CHROME_BROWSER_UI_VIEWS_DOM_VIEW_H_
#define CHROME_BROWSER_UI_VIEWS_DOM_VIEW_H_
#pragma once
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "googleurl/src/gurl.h"
#include "ui/views/controls/native/native_view_host.h"
#include "ui/views/events/event.h"
class Profile;
namespace content {
class SiteInstance;
};
class DOMView : public views::NativeViewHost {
public:
// Internal class name.
static const char kViewClassName[];
DOMView();
virtual ~DOMView();
// Overridden from View.
virtual std::string GetClassName() const OVERRIDE;
// Initialize the view, creating the contents. This should be
// called once the view has been added to a container.
//
// If |instance| is not null, then the view will be loaded in the same
// process as the given instance.
bool Init(Profile* profile, content::SiteInstance* instance);
// Loads the given URL into the page. You must have previously called Init().
void LoadURL(const GURL& url);
// The TabContentsWrapper displaying the DOM contents; may be null.
TabContentsWrapper* dom_contents() const { return dom_contents_.get(); }
protected:
// Overridden from View.
virtual bool SkipDefaultKeyEventProcessing(const views::KeyEvent& e) OVERRIDE;
virtual void OnFocus() OVERRIDE;
virtual void ViewHierarchyChanged(bool is_add, views::View* parent,
views::View* child) OVERRIDE;
// AttachTabContents calls Attach to hook up the NativeViewHost. This is
// here because depending on whether this is a touch build or not the
// implementation varies slightly, while Detach is the same in both cases.
void AttachTabContents();
// Returns new allocated WebContents instance, caller is responsible deleting.
// Override in derived classes to replace WebContents with derivative.
virtual content::WebContents* CreateTabContents(
Profile* profile, content::SiteInstance* instance);
scoped_ptr<TabContentsWrapper> dom_contents_;
private:
bool initialized_;
DISALLOW_COPY_AND_ASSIGN(DOMView);
};
#endif // CHROME_BROWSER_UI_VIEWS_DOM_VIEW_H_
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/views/dom_view.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "ui/views/widget/widget.h"
using views::Widget;
class DOMViewTest : public InProcessBrowserTest {
public:
Widget* CreatePopupWindow() {
Widget* widget = new Widget;
Widget::InitParams params(Widget::InitParams::TYPE_POPUP);
params.bounds = gfx::Rect(0, 0, 400, 400);
widget->Init(params);
return widget;
}
};
// Tests if creating and deleting dom_view
// does not crash and leak memory.
IN_PROC_BROWSER_TEST_F(DOMViewTest, TestShowAndHide) {
Widget* one = CreatePopupWindow();
DOMView* dom_view = new DOMView();
one->GetRootView()->AddChildView(dom_view);
dom_view->Init(browser()->profile(), NULL);
ui_test_utils::WindowedNotificationObserver load_stop_observer(
content::NOTIFICATION_LOAD_STOP,
content::NotificationService::AllSources());
dom_view->LoadURL(GURL("http://www.google.com"));
load_stop_observer.Wait();
one->Show();
ui_test_utils::RunAllPendingInMessageLoop();
one->Hide();
}
// Tests if removing from tree then deleting dom_view
// does not crash and leak memory.
IN_PROC_BROWSER_TEST_F(DOMViewTest, TestRemoveAndDelete) {
Widget* one = CreatePopupWindow();
DOMView* dom_view = new DOMView();
one->GetRootView()->AddChildView(dom_view);
dom_view->Init(browser()->profile(), NULL);
ui_test_utils::WindowedNotificationObserver load_stop_observer(
content::NOTIFICATION_LOAD_STOP,
content::NotificationService::AllSources());
dom_view->LoadURL(GURL("http://www.google.com"));
load_stop_observer.Wait();
one->Show();
ui_test_utils::RunAllPendingInMessageLoop();
one->GetRootView()->RemoveChildView(dom_view);
delete dom_view;
one->Hide();
}
// Tests if reparenting dom_view does not crash and does not leak
// memory.
IN_PROC_BROWSER_TEST_F(DOMViewTest, TestReparent) {
Widget* one = CreatePopupWindow();
DOMView* dom_view = new DOMView();
one->GetRootView()->AddChildView(dom_view);
dom_view->Init(browser()->profile(), NULL);
ui_test_utils::WindowedNotificationObserver load_stop_observer(
content::NOTIFICATION_LOAD_STOP,
content::NotificationService::AllSources());
dom_view->LoadURL(GURL("http://www.google.com"));
load_stop_observer.Wait();
one->Show();
ui_test_utils::RunAllPendingInMessageLoop();
one->GetRootView()->RemoveChildView(dom_view);
one->Hide();
// Re-attach to another Widget.
Widget* two = CreatePopupWindow();
two->GetRootView()->AddChildView(dom_view);
two->Show();
ui_test_utils::RunAllPendingInMessageLoop();
two->Hide();
}
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
#include <vector> #include <vector>
#include "base/property_bag.h"
#include "base/utf_string_conversions.h" #include "base/utf_string_conversions.h"
#include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser_dialogs.h" #include "chrome/browser/ui/browser_dialogs.h"
...@@ -17,9 +16,7 @@ ...@@ -17,9 +16,7 @@
#include "content/public/browser/notification_types.h" #include "content/public/browser/notification_types.h"
#include "content/public/browser/web_contents.h" #include "content/public/browser/web_contents.h"
#include "ui/base/keycodes/keyboard_codes.h" #include "ui/base/keycodes/keyboard_codes.h"
#include "ui/views/controls/webview/webview.h"
#include "ui/views/events/event.h" #include "ui/views/events/event.h"
#include "ui/views/layout/fill_layout.h"
#include "ui/views/widget/root_view.h" #include "ui/views/widget/root_view.h"
#include "ui/views/widget/widget.h" #include "ui/views/widget/widget.h"
...@@ -39,11 +36,11 @@ gfx::NativeWindow ShowHtmlDialog(gfx::NativeWindow parent, ...@@ -39,11 +36,11 @@ gfx::NativeWindow ShowHtmlDialog(gfx::NativeWindow parent,
Browser* browser, Browser* browser,
HtmlDialogUIDelegate* delegate, HtmlDialogUIDelegate* delegate,
DialogStyle style) { DialogStyle style) {
views::Widget* widget = views::Widget::CreateWindowWithParent( HtmlDialogView* html_view = new HtmlDialogView(profile, browser, delegate);
new HtmlDialogView(profile, browser, delegate), views::Widget::CreateWindowWithParent(html_view, parent);
parent); html_view->InitDialog();
widget->Show(); html_view->GetWidget()->Show();
return widget->GetNativeWindow(); return html_view->GetWidget()->GetNativeWindow();
} }
void CloseHtmlDialog(gfx::NativeWindow window) { void CloseHtmlDialog(gfx::NativeWindow window) {
...@@ -58,24 +55,16 @@ void CloseHtmlDialog(gfx::NativeWindow window) { ...@@ -58,24 +55,16 @@ void CloseHtmlDialog(gfx::NativeWindow window) {
HtmlDialogView::HtmlDialogView(Profile* profile, HtmlDialogView::HtmlDialogView(Profile* profile,
Browser* browser, Browser* browser,
HtmlDialogUIDelegate* delegate) HtmlDialogUIDelegate* delegate)
: HtmlDialogTabContentsDelegate(profile), : DOMView(),
HtmlDialogTabContentsDelegate(profile),
initialized_(false), initialized_(false),
delegate_(delegate), delegate_(delegate),
dialog_controller_(new HtmlDialogController(this, profile, browser)), dialog_controller_(new HtmlDialogController(this, profile, browser)) {
web_view_(new views::WebView(profile)) {
AddChildView(web_view_);
SetLayoutManager(new views::FillLayout);
// Pressing the ESC key will close the dialog.
AddAccelerator(ui::Accelerator(ui::VKEY_ESCAPE, false, false, false));
} }
HtmlDialogView::~HtmlDialogView() { HtmlDialogView::~HtmlDialogView() {
} }
content::WebContents* HtmlDialogView::web_contents() {
return web_view_->web_contents();
}
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// HtmlDialogView, views::View implementation: // HtmlDialogView, views::View implementation:
...@@ -93,11 +82,13 @@ bool HtmlDialogView::AcceleratorPressed(const ui::Accelerator& accelerator) { ...@@ -93,11 +82,13 @@ bool HtmlDialogView::AcceleratorPressed(const ui::Accelerator& accelerator) {
return true; return true;
} }
void HtmlDialogView::ViewHierarchyChanged(bool is_add, void HtmlDialogView::ViewHierarchyChanged(
views::View* parent, bool is_add, View* parent, View* child) {
views::View* child) { DOMView::ViewHierarchyChanged(is_add, parent, child);
if (is_add && GetWidget()) if (is_add && GetWidget() && !initialized_) {
InitDialog(); initialized_ = true;
RegisterDialogAccelerators();
}
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
...@@ -136,7 +127,7 @@ views::View* HtmlDialogView::GetContentsView() { ...@@ -136,7 +127,7 @@ views::View* HtmlDialogView::GetContentsView() {
} }
views::View* HtmlDialogView::GetInitiallyFocusedView() { views::View* HtmlDialogView::GetInitiallyFocusedView() {
return web_view_; return this;
} }
bool HtmlDialogView::ShouldShowWindowTitle() const { bool HtmlDialogView::ShouldShowWindowTitle() const {
...@@ -290,26 +281,13 @@ void HtmlDialogView::LoadingStateChanged(content::WebContents* source) { ...@@ -290,26 +281,13 @@ void HtmlDialogView::LoadingStateChanged(content::WebContents* source) {
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// HtmlDialogView, TabRenderWatcher::Delegate implementation: // HtmlDialogView:
void HtmlDialogView::OnRenderHostCreated(content::RenderViewHost* host) {
}
void HtmlDialogView::OnTabMainFrameLoaded() {
}
void HtmlDialogView::OnTabMainFrameRender() {
tab_watcher_.reset();
}
////////////////////////////////////////////////////////////////////////////////
// HtmlDialogView, private:
void HtmlDialogView::InitDialog() { void HtmlDialogView::InitDialog() {
content::WebContents* web_contents = web_view_->GetWebContents(); // Now Init the DOMView. This view runs in its own process to render the html.
if (web_contents->GetDelegate() == this) DOMView::Init(profile(), NULL);
return;
WebContents* web_contents = dom_contents_->web_contents();
web_contents->SetDelegate(this); web_contents->SetDelegate(this);
// Set the delegate. This must be done before loading the page. See // Set the delegate. This must be done before loading the page. See
...@@ -325,5 +303,20 @@ void HtmlDialogView::InitDialog() { ...@@ -325,5 +303,20 @@ void HtmlDialogView::InitDialog() {
GetWidget()->CenterWindow(out); GetWidget()->CenterWindow(out);
} }
web_view_->LoadInitialURL(GetDialogContentURL()); DOMView::LoadURL(GetDialogContentURL());
}
void HtmlDialogView::RegisterDialogAccelerators() {
// Pressing the ESC key will close the dialog.
AddAccelerator(ui::Accelerator(ui::VKEY_ESCAPE, false, false, false));
}
void HtmlDialogView::OnRenderHostCreated(content::RenderViewHost* host) {
}
void HtmlDialogView::OnTabMainFrameLoaded() {
}
void HtmlDialogView::OnTabMainFrameRender() {
tab_watcher_.reset();
} }
...@@ -12,20 +12,16 @@ ...@@ -12,20 +12,16 @@
#include "base/gtest_prod_util.h" #include "base/gtest_prod_util.h"
#include "base/memory/scoped_ptr.h" #include "base/memory/scoped_ptr.h"
#include "chrome/browser/tab_render_watcher.h" #include "chrome/browser/tab_render_watcher.h"
#include "chrome/browser/ui/views/dom_view.h"
#include "chrome/browser/ui/webui/html_dialog_tab_contents_delegate.h" #include "chrome/browser/ui/webui/html_dialog_tab_contents_delegate.h"
#include "chrome/browser/ui/webui/html_dialog_ui.h" #include "chrome/browser/ui/webui/html_dialog_ui.h"
#include "ui/gfx/size.h" #include "ui/gfx/size.h"
#include "ui/views/view.h"
#include "ui/views/widget/widget_delegate.h" #include "ui/views/widget/widget_delegate.h"
class Browser; class Browser;
class HtmlDialogController; class HtmlDialogController;
class Profile; class Profile;
namespace views {
class WebView;
}
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// //
// HtmlDialogView is a view used to display an HTML dialog to the user. The // HtmlDialogView is a view used to display an HTML dialog to the user. The
...@@ -39,10 +35,8 @@ class WebView; ...@@ -39,10 +35,8 @@ class WebView;
// TODO(akalin): Make HtmlDialogView contain an HtmlDialogTabContentsDelegate // TODO(akalin): Make HtmlDialogView contain an HtmlDialogTabContentsDelegate
// instead of inheriting from it to avoid violating the "no multiple // instead of inheriting from it to avoid violating the "no multiple
// inheritance" rule. // inheritance" rule.
// TODO(beng): This class should not depend on Browser or Profile, only
// content::BrowserContext.
class HtmlDialogView class HtmlDialogView
: public views::View, : public DOMView,
public HtmlDialogTabContentsDelegate, public HtmlDialogTabContentsDelegate,
public HtmlDialogUIDelegate, public HtmlDialogUIDelegate,
public views::WidgetDelegate, public views::WidgetDelegate,
...@@ -53,16 +47,15 @@ class HtmlDialogView ...@@ -53,16 +47,15 @@ class HtmlDialogView
HtmlDialogUIDelegate* delegate); HtmlDialogUIDelegate* delegate);
virtual ~HtmlDialogView(); virtual ~HtmlDialogView();
// For testing. // Initializes the contents of the dialog (the DOMView and the callbacks).
content::WebContents* web_contents(); void InitDialog();
// Overridden from views::View: // Overridden from views::View:
virtual gfx::Size GetPreferredSize() OVERRIDE; virtual gfx::Size GetPreferredSize() OVERRIDE;
virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) virtual bool AcceleratorPressed(const ui::Accelerator& accelerator)
OVERRIDE; OVERRIDE;
virtual void ViewHierarchyChanged(bool is_add, virtual void ViewHierarchyChanged(bool is_add, View* parent, View* child)
views::View* parent, OVERRIDE;
views::View* child) OVERRIDE;
// Overridden from views::WidgetDelegate: // Overridden from views::WidgetDelegate:
virtual bool CanResize() const OVERRIDE; virtual bool CanResize() const OVERRIDE;
...@@ -109,7 +102,10 @@ class HtmlDialogView ...@@ -109,7 +102,10 @@ class HtmlDialogView
virtual void LoadingStateChanged(content::WebContents* source) OVERRIDE; virtual void LoadingStateChanged(content::WebContents* source) OVERRIDE;
protected: protected:
// Overridden from TabRenderWatcher::Delegate: // Register accelerators for this dialog.
virtual void RegisterDialogAccelerators();
// TabRenderWatcher::Delegate implementation.
virtual void OnRenderHostCreated(content::RenderViewHost* host) OVERRIDE; virtual void OnRenderHostCreated(content::RenderViewHost* host) OVERRIDE;
virtual void OnTabMainFrameLoaded() OVERRIDE; virtual void OnTabMainFrameLoaded() OVERRIDE;
virtual void OnTabMainFrameRender() OVERRIDE; virtual void OnTabMainFrameRender() OVERRIDE;
...@@ -117,10 +113,7 @@ class HtmlDialogView ...@@ -117,10 +113,7 @@ class HtmlDialogView
private: private:
FRIEND_TEST_ALL_PREFIXES(HtmlDialogBrowserTest, WebContentRendered); FRIEND_TEST_ALL_PREFIXES(HtmlDialogBrowserTest, WebContentRendered);
// Initializes the contents of the dialog. // Whether the view is initialized. That is, dialog acceleartors is registered
void InitDialog();
// Whether the view is initialized. That is, dialog accelerators is registered
// and FreezeUpdates property is set to prevent WM from showing the window // and FreezeUpdates property is set to prevent WM from showing the window
// until the property is removed. // until the property is removed.
bool initialized_; bool initialized_;
...@@ -137,8 +130,6 @@ class HtmlDialogView ...@@ -137,8 +130,6 @@ class HtmlDialogView
// Controls lifetime of dialog. // Controls lifetime of dialog.
scoped_ptr<HtmlDialogController> dialog_controller_; scoped_ptr<HtmlDialogController> dialog_controller_;
views::WebView* web_view_;
DISALLOW_COPY_AND_ASSIGN(HtmlDialogView); DISALLOW_COPY_AND_ASSIGN(HtmlDialogView);
}; };
......
...@@ -114,6 +114,7 @@ IN_PROC_BROWSER_TEST_F(HtmlDialogBrowserTest, MAYBE_SizeWindow) { ...@@ -114,6 +114,7 @@ IN_PROC_BROWSER_TEST_F(HtmlDialogBrowserTest, MAYBE_SizeWindow) {
ASSERT_TRUE(web_contents != NULL); ASSERT_TRUE(web_contents != NULL);
views::Widget::CreateWindowWithParent( views::Widget::CreateWindowWithParent(
html_view, web_contents->GetView()->GetTopLevelNativeWindow()); html_view, web_contents->GetView()->GetTopLevelNativeWindow());
html_view->InitDialog();
html_view->GetWidget()->Show(); html_view->GetWidget()->Show();
// TestHtmlDialogView should quit current message loop on size change. // TestHtmlDialogView should quit current message loop on size change.
...@@ -133,8 +134,8 @@ IN_PROC_BROWSER_TEST_F(HtmlDialogBrowserTest, MAYBE_SizeWindow) { ...@@ -133,8 +134,8 @@ IN_PROC_BROWSER_TEST_F(HtmlDialogBrowserTest, MAYBE_SizeWindow) {
actual_bounds = html_view->GetWidget()->GetClientAreaScreenBounds(); actual_bounds = html_view->GetWidget()->GetClientAreaScreenBounds();
EXPECT_EQ(set_bounds, actual_bounds); EXPECT_EQ(set_bounds, actual_bounds);
rwhv_bounds = rwhv_bounds = html_view->dom_contents()->web_contents()->
html_view->web_contents()->GetRenderWidgetHostView()->GetViewBounds(); GetRenderWidgetHostView()->GetViewBounds();
EXPECT_LT(0, rwhv_bounds.width()); EXPECT_LT(0, rwhv_bounds.width());
EXPECT_LT(0, rwhv_bounds.height()); EXPECT_LT(0, rwhv_bounds.height());
EXPECT_GE(set_bounds.width(), rwhv_bounds.width()); EXPECT_GE(set_bounds.width(), rwhv_bounds.width());
...@@ -149,8 +150,8 @@ IN_PROC_BROWSER_TEST_F(HtmlDialogBrowserTest, MAYBE_SizeWindow) { ...@@ -149,8 +150,8 @@ IN_PROC_BROWSER_TEST_F(HtmlDialogBrowserTest, MAYBE_SizeWindow) {
actual_bounds = html_view->GetWidget()->GetClientAreaScreenBounds(); actual_bounds = html_view->GetWidget()->GetClientAreaScreenBounds();
EXPECT_EQ(set_bounds, actual_bounds); EXPECT_EQ(set_bounds, actual_bounds);
rwhv_bounds = rwhv_bounds = html_view->dom_contents()->web_contents()->
html_view->web_contents()->GetRenderWidgetHostView()->GetViewBounds(); GetRenderWidgetHostView()->GetViewBounds();
EXPECT_LT(0, rwhv_bounds.width()); EXPECT_LT(0, rwhv_bounds.width());
EXPECT_LT(0, rwhv_bounds.height()); EXPECT_LT(0, rwhv_bounds.height());
EXPECT_GE(set_bounds.width(), rwhv_bounds.width()); EXPECT_GE(set_bounds.width(), rwhv_bounds.width());
...@@ -165,8 +166,8 @@ IN_PROC_BROWSER_TEST_F(HtmlDialogBrowserTest, MAYBE_SizeWindow) { ...@@ -165,8 +166,8 @@ IN_PROC_BROWSER_TEST_F(HtmlDialogBrowserTest, MAYBE_SizeWindow) {
actual_bounds = html_view->GetWidget()->GetClientAreaScreenBounds(); actual_bounds = html_view->GetWidget()->GetClientAreaScreenBounds();
EXPECT_EQ(set_bounds, actual_bounds); EXPECT_EQ(set_bounds, actual_bounds);
rwhv_bounds = rwhv_bounds = html_view->dom_contents()->web_contents()->
html_view->web_contents()->GetRenderWidgetHostView()->GetViewBounds(); GetRenderWidgetHostView()->GetViewBounds();
EXPECT_LT(0, rwhv_bounds.width()); EXPECT_LT(0, rwhv_bounds.width());
EXPECT_LT(0, rwhv_bounds.height()); EXPECT_LT(0, rwhv_bounds.height());
EXPECT_GE(set_bounds.width(), rwhv_bounds.width()); EXPECT_GE(set_bounds.width(), rwhv_bounds.width());
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
#include "grit/generated_resources.h" #include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h" #include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/screen.h" #include "ui/gfx/screen.h"
#include "ui/views/widget/widget.h"
using content::WebContents; using content::WebContents;
using content::WebUIMessageHandler; using content::WebUIMessageHandler;
...@@ -58,7 +57,7 @@ void KeyboardOverlayDelegate::GetDialogSize( ...@@ -58,7 +57,7 @@ void KeyboardOverlayDelegate::GetDialogSize(
using std::min; using std::min;
DCHECK(view_); DCHECK(view_);
gfx::Rect rect = gfx::Screen::GetMonitorAreaNearestWindow( gfx::Rect rect = gfx::Screen::GetMonitorAreaNearestWindow(
view_->GetWidget()->GetNativeView()); view_->native_view());
const int width = min(kBaseWidth, rect.width() - kHorizontalMargin); const int width = min(kBaseWidth, rect.width() - kHorizontalMargin);
const int height = width * kBaseHeight / kBaseWidth; const int height = width * kBaseHeight / kBaseWidth;
size->SetSize(width, height); size->SetSize(width, height);
......
...@@ -92,12 +92,13 @@ void KeyboardOverlayDialogView::ShowDialog( ...@@ -92,12 +92,13 @@ void KeyboardOverlayDialogView::ShowDialog(
delegate, delegate,
parent_view); parent_view);
delegate->set_view(html_view); delegate->set_view(html_view);
html_view->InitDialog();
browser::CreateFramelessViewsWindow(owning_window, html_view); browser::CreateFramelessViewsWindow(owning_window, html_view);
// Show the widget at the bottom of the work area. // Show the widget at the bottom of the work area.
gfx::Size size; gfx::Size size;
delegate->GetDialogSize(&size); delegate->GetDialogSize(&size);
gfx::Rect rect = gfx::Screen::GetMonitorWorkAreaNearestWindow( gfx::Rect rect = gfx::Screen::GetMonitorWorkAreaNearestWindow(
html_view->GetWidget()->GetNativeView()); html_view->native_view());
gfx::Rect bounds((rect.width() - size.width()) / 2, gfx::Rect bounds((rect.width() - size.width()) / 2,
rect.height() - size.height(), rect.height() - size.height(),
size.width(), size.width(),
......
...@@ -154,7 +154,7 @@ class KeyboardWidget ...@@ -154,7 +154,7 @@ class KeyboardWidget
GURL keyboard_url_; GURL keyboard_url_;
// The WebView to host the keyboard. // The WebView to host the keyboard.
views::WebView* web_view_; views::WebView* webview_;
ExtensionFunctionDispatcher extension_dispatcher_; ExtensionFunctionDispatcher extension_dispatcher_;
...@@ -172,7 +172,7 @@ class KeyboardWidget ...@@ -172,7 +172,7 @@ class KeyboardWidget
KeyboardWidget::KeyboardWidget() KeyboardWidget::KeyboardWidget()
: views::Widget::Widget(), : views::Widget::Widget(),
keyboard_url_(chrome::kChromeUIKeyboardURL), keyboard_url_(chrome::kChromeUIKeyboardURL),
web_view_(new views::WebView(ProfileManager::GetDefaultProfile()))), webview_(new DOMView(ProfileManager::GetDefaultProfile()))),
ALLOW_THIS_IN_INITIALIZER_LIST( ALLOW_THIS_IN_INITIALIZER_LIST(
extension_dispatcher_(ProfileManager::GetDefaultProfile(), this)), extension_dispatcher_(ProfileManager::GetDefaultProfile(), this)),
target_(NULL), target_(NULL),
...@@ -190,14 +190,14 @@ KeyboardWidget::KeyboardWidget() ...@@ -190,14 +190,14 @@ KeyboardWidget::KeyboardWidget()
Init(params); Init(params);
// Setup the DOM view to host the keyboard. // Setup the DOM view to host the keyboard.
web_view_->CreateWebContentsWithSiteInstance( webview_->CreateWebContentsWithSiteInstance(
content::SiteInstance::CreateForURL(web_view_->browser_context(), content::SiteInstance::CreateForURL(webview_->browser_context(),
keyboard_url_)); keyboard_url_));
web_view_->LoadInitialURL(keyboard_url_); webview_->LoadInitialURL(keyboard_url_);
SetContentsView(web_view_); SetContentsView(webview_);
// Setup observer so the events from the keyboard can be handled. // Setup observer so the events from the keyboard can be handled.
content::WebContentsObserver::Observe(web_view_->web_contents()); content::WebContentsObserver::Observe(webview_->web_contents());
// Initialize the animation. // Initialize the animation.
animation_.reset(new ui::SlideAnimation(this)); animation_.reset(new ui::SlideAnimation(this));
...@@ -342,15 +342,14 @@ bool KeyboardWidget::OnMessageReceived(const IPC::Message& message) { ...@@ -342,15 +342,14 @@ bool KeyboardWidget::OnMessageReceived(const IPC::Message& message) {
void KeyboardWidget::RenderViewGone(base::TerminationStatus status) { void KeyboardWidget::RenderViewGone(base::TerminationStatus status) {
if (status != base::TERMINATION_STATUS_NORMAL_TERMINATION) { if (status != base::TERMINATION_STATUS_NORMAL_TERMINATION) {
// Reload the keyboard if it crashes. // Reload the keyboard if it crashes.
web_view_->LoadInitialURL(keyboard_url_); webview_->LoadInitialURL(keyboard_url_);
web_view_->SchedulePaint(); webview_->SchedulePaint();
} }
} }
void KeyboardWidget::OnRequest(const ExtensionHostMsg_Request_Params& request) { void KeyboardWidget::OnRequest(const ExtensionHostMsg_Request_Params& request) {
extension_dispatcher_.Dispatch( extension_dispatcher_.Dispatch(request,
request, webview_->web_contents()->GetRenderViewHost());
web_view_->web_contents()->GetRenderViewHost());
} }
void KeyboardWidget::TextInputTypeChanged(ui::TextInputType type, void KeyboardWidget::TextInputTypeChanged(ui::TextInputType type,
...@@ -400,7 +399,7 @@ void KeyboardWidget::TextInputTypeChanged(ui::TextInputType type, ...@@ -400,7 +399,7 @@ void KeyboardWidget::TextInputTypeChanged(ui::TextInputType type,
std::string json_args; std::string json_args;
base::JSONWriter::Write(&args, &json_args); base::JSONWriter::Write(&args, &json_args);
Profile* profile = Profile::FromBrowserContext(web_view_->browser_context()); Profile* profile = Profile::FromBrowserContext(webview_->browser_context());
profile->GetExtensionEventRouter()->DispatchEventToRenderers( profile->GetExtensionEventRouter()->DispatchEventToRenderers(
kOnTextInputTypeChanged, json_args, NULL, GURL()); kOnTextInputTypeChanged, json_args, NULL, GURL());
...@@ -418,7 +417,7 @@ Browser* KeyboardWidget::GetBrowser() { ...@@ -418,7 +417,7 @@ Browser* KeyboardWidget::GetBrowser() {
} }
content::WebContents* KeyboardWidget::GetAssociatedWebContents() const { content::WebContents* KeyboardWidget::GetAssociatedWebContents() const {
return web_view_->web_contents(); return webview_->web_contents();
} }
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
...@@ -427,7 +426,7 @@ void KeyboardWidget::VirtualKeyboardChanged( ...@@ -427,7 +426,7 @@ void KeyboardWidget::VirtualKeyboardChanged(
const chromeos::input_method::VirtualKeyboard& virtual_keyboard, const chromeos::input_method::VirtualKeyboard& virtual_keyboard,
const std::string& virtual_keyboard_layout) { const std::string& virtual_keyboard_layout) {
const GURL& url = virtual_keyboard.GetURLForLayout(virtual_keyboard_layout); const GURL& url = virtual_keyboard.GetURLForLayout(virtual_keyboard_layout);
web_view_->LoadInitialURL(url); webview_->LoadInitialURL(url);
VLOG(1) << "VirtualKeyboardChanged: Switched to " << url.spec(); VLOG(1) << "VirtualKeyboardChanged: Switched to " << url.spec();
} }
#endif #endif
......
...@@ -3284,6 +3284,8 @@ ...@@ -3284,6 +3284,8 @@
'browser/ui/views/critical_notification_bubble_view.h', 'browser/ui/views/critical_notification_bubble_view.h',
'browser/ui/views/detachable_toolbar_view.cc', 'browser/ui/views/detachable_toolbar_view.cc',
'browser/ui/views/detachable_toolbar_view.h', 'browser/ui/views/detachable_toolbar_view.h',
'browser/ui/views/dom_view.cc',
'browser/ui/views/dom_view.h',
'browser/ui/views/download/download_in_progress_dialog_view.cc', 'browser/ui/views/download/download_in_progress_dialog_view.cc',
'browser/ui/views/download/download_in_progress_dialog_view.h', 'browser/ui/views/download/download_in_progress_dialog_view.h',
'browser/ui/views/download/download_item_view.cc', 'browser/ui/views/download/download_item_view.cc',
...@@ -4810,6 +4812,8 @@ ...@@ -4810,6 +4812,8 @@
['include', '^browser/ui/views/crypto_module_password_dialog_view.h'], ['include', '^browser/ui/views/crypto_module_password_dialog_view.h'],
['include', '^browser/ui/views/detachable_toolbar_view.cc'], ['include', '^browser/ui/views/detachable_toolbar_view.cc'],
['include', '^browser/ui/views/detachable_toolbar_view.h'], ['include', '^browser/ui/views/detachable_toolbar_view.h'],
['include', '^browser/ui/views/dom_view.cc'],
['include', '^browser/ui/views/dom_view.h'],
['include', '^browser/ui/views/download/download_in_progress_dialog_view.cc'], ['include', '^browser/ui/views/download/download_in_progress_dialog_view.cc'],
['include', '^browser/ui/views/download/download_in_progress_dialog_view.h'], ['include', '^browser/ui/views/download/download_in_progress_dialog_view.h'],
['include', '^browser/ui/views/download/download_item_view.cc'], ['include', '^browser/ui/views/download/download_item_view.cc'],
......
...@@ -2937,6 +2937,7 @@ ...@@ -2937,6 +2937,7 @@
'browser/ui/views/ash/caps_lock_handler_browsertest.cc', 'browser/ui/views/ash/caps_lock_handler_browsertest.cc',
'browser/ui/views/ash/launcher/launcher_favicon_loader_browsertest.cc', 'browser/ui/views/ash/launcher/launcher_favicon_loader_browsertest.cc',
'browser/ui/views/browser_actions_container_browsertest.cc', 'browser/ui/views/browser_actions_container_browsertest.cc',
'browser/ui/views/dom_view_browsertest.cc',
'browser/ui/views/html_dialog_view_browsertest.cc', 'browser/ui/views/html_dialog_view_browsertest.cc',
'browser/ui/views/select_file_dialog_extension_browsertest.cc', 'browser/ui/views/select_file_dialog_extension_browsertest.cc',
'browser/ui/views/sync/one_click_signin_bubble_view_browsertest.cc', 'browser/ui/views/sync/one_click_signin_bubble_view_browsertest.cc',
...@@ -3356,6 +3357,7 @@ ...@@ -3356,6 +3357,7 @@
'browser/ui/panels/panel_browser_view_browsertest.cc', 'browser/ui/panels/panel_browser_view_browsertest.cc',
'browser/ui/views/browser_actions_container_browsertest.cc', 'browser/ui/views/browser_actions_container_browsertest.cc',
'browser/ui/views/crypto_module_password_dialog_view_unittest.cc', 'browser/ui/views/crypto_module_password_dialog_view_unittest.cc',
'browser/ui/views/dom_view_browsertest.cc',
'browser/ui/views/html_dialog_view_browsertest.cc', 'browser/ui/views/html_dialog_view_browsertest.cc',
'browser/ui/views/sync/one_click_signin_bubble_view_browsertest.cc', 'browser/ui/views/sync/one_click_signin_bubble_view_browsertest.cc',
], ],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment