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

Unified Diff: views/widget/widget_delegate.cc

Issue 8598031: views: Move widget/ directory to ui/views. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reland for real Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « views/widget/widget_delegate.h ('k') | views/widget/widget_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/widget/widget_delegate.cc
diff --git a/views/widget/widget_delegate.cc b/views/widget/widget_delegate.cc
deleted file mode 100644
index c64f8e6da971456c5d58222b1e842811088e4058..0000000000000000000000000000000000000000
--- a/views/widget/widget_delegate.cc
+++ /dev/null
@@ -1,166 +0,0 @@
-// 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 "views/widget/widget_delegate.h"
-
-#include "base/utf_string_conversions.h"
-#include "third_party/skia/include/core/SkBitmap.h"
-#include "ui/views/bubble/bubble_delegate.h"
-#include "ui/views/window/client_view.h"
-#include "views/view.h"
-#include "views/views_delegate.h"
-#include "views/widget/widget.h"
-
-namespace views {
-
-////////////////////////////////////////////////////////////////////////////////
-// WidgetDelegate:
-
-WidgetDelegate::WidgetDelegate() : default_contents_view_(NULL) {
-}
-
-void WidgetDelegate::OnWidgetMove() {
-}
-
-void WidgetDelegate::OnDisplayChanged() {
-}
-
-void WidgetDelegate::OnWorkAreaChanged() {
-}
-
-View* WidgetDelegate::GetInitiallyFocusedView() {
- return NULL;
-}
-
-BubbleDelegateView* WidgetDelegate::AsBubbleDelegate() {
- return NULL;
-}
-
-DialogDelegate* WidgetDelegate::AsDialogDelegate() {
- return NULL;
-}
-
-bool WidgetDelegate::CanResize() const {
- return false;
-}
-
-bool WidgetDelegate::CanMaximize() const {
- return false;
-}
-
-bool WidgetDelegate::CanActivate() const {
- return true;
-}
-
-bool WidgetDelegate::IsModal() const {
- return false;
-}
-
-ui::AccessibilityTypes::Role WidgetDelegate::GetAccessibleWindowRole() const {
- return ui::AccessibilityTypes::ROLE_WINDOW;
-}
-
-ui::AccessibilityTypes::State WidgetDelegate::GetAccessibleWindowState() const {
- return 0;
-}
-
-string16 WidgetDelegate::GetAccessibleWindowTitle() const {
- return GetWindowTitle();
-}
-
-string16 WidgetDelegate::GetWindowTitle() const {
- return string16();
-}
-
-bool WidgetDelegate::ShouldShowWindowTitle() const {
- return true;
-}
-
-bool WidgetDelegate::ShouldShowClientEdge() const {
- return true;
-}
-
-SkBitmap WidgetDelegate::GetWindowAppIcon() {
- // Use the window icon as app icon by default.
- return GetWindowIcon();
-}
-
-// Returns the icon to be displayed in the window.
-SkBitmap WidgetDelegate::GetWindowIcon() {
- return SkBitmap();
-}
-
-bool WidgetDelegate::ShouldShowWindowIcon() const {
- return false;
-}
-
-bool WidgetDelegate::ExecuteWindowsCommand(int command_id) {
- return false;
-}
-
-std::string WidgetDelegate::GetWindowName() const {
- return std::string();
-}
-
-void WidgetDelegate::SaveWindowPlacement(const gfx::Rect& bounds,
- ui::WindowShowState show_state) {
- std::string window_name = GetWindowName();
- if (!ViewsDelegate::views_delegate || window_name.empty())
- return;
-
- ViewsDelegate::views_delegate->SaveWindowPlacement(
- GetWidget(), window_name, bounds, show_state);
-}
-
-bool WidgetDelegate::GetSavedWindowPlacement(
- gfx::Rect* bounds,
- ui::WindowShowState* show_state) const {
- std::string window_name = GetWindowName();
- if (!ViewsDelegate::views_delegate || window_name.empty())
- return false;
-
- return ViewsDelegate::views_delegate->GetSavedWindowPlacement(
- window_name, bounds, show_state);
-}
-
-bool WidgetDelegate::ShouldRestoreWindowSize() const {
- return true;
-}
-
-View* WidgetDelegate::GetContentsView() {
- if (!default_contents_view_)
- default_contents_view_ = new View;
- return default_contents_view_;
-}
-
-ClientView* WidgetDelegate::CreateClientView(Widget* widget) {
- return new ClientView(widget, GetContentsView());
-}
-
-NonClientFrameView* WidgetDelegate::CreateNonClientFrameView() {
- return NULL;
-}
-
-bool WidgetDelegate::WillProcessWorkAreaChange() const {
- return false;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// WidgetDelegateView:
-
-WidgetDelegateView::WidgetDelegateView() {
-}
-
-WidgetDelegateView::~WidgetDelegateView() {
-}
-
-Widget* WidgetDelegateView::GetWidget() {
- return View::GetWidget();
-}
-
-const Widget* WidgetDelegateView::GetWidget() const {
- return View::GetWidget();
-}
-
-} // namespace views
« no previous file with comments | « views/widget/widget_delegate.h ('k') | views/widget/widget_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698