OLD | NEW |
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 #include "chrome/browser/ui/views/frame/browser_view.h" | 5 #include "chrome/browser/ui/views/frame/browser_view.h" |
6 | 6 |
7 #if defined(TOOLKIT_USES_GTK) | 7 #if defined(TOOLKIT_USES_GTK) |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 #include "chrome/common/pref_names.h" | 76 #include "chrome/common/pref_names.h" |
77 #include "chrome/common/url_constants.h" | 77 #include "chrome/common/url_constants.h" |
78 #include "content/browser/download/download_manager.h" | 78 #include "content/browser/download/download_manager.h" |
79 #include "content/browser/renderer_host/render_view_host.h" | 79 #include "content/browser/renderer_host/render_view_host.h" |
80 #include "content/browser/renderer_host/render_widget_host_view.h" | 80 #include "content/browser/renderer_host/render_widget_host_view.h" |
81 #include "content/browser/tab_contents/tab_contents.h" | 81 #include "content/browser/tab_contents/tab_contents.h" |
82 #include "content/browser/tab_contents/tab_contents_view.h" | 82 #include "content/browser/tab_contents/tab_contents_view.h" |
83 #include "content/browser/user_metrics.h" | 83 #include "content/browser/user_metrics.h" |
84 #include "content/common/content_switches.h" | 84 #include "content/common/content_switches.h" |
85 #include "content/common/notification_service.h" | 85 #include "content/common/notification_service.h" |
86 #include "content/common/view_messages.h" | |
87 #include "grit/chromium_strings.h" | 86 #include "grit/chromium_strings.h" |
88 #include "grit/generated_resources.h" | 87 #include "grit/generated_resources.h" |
89 #include "grit/locale_settings.h" | 88 #include "grit/locale_settings.h" |
90 #include "grit/theme_resources.h" | 89 #include "grit/theme_resources.h" |
91 #include "grit/theme_resources_standard.h" | 90 #include "grit/theme_resources_standard.h" |
92 #include "grit/ui_resources.h" | 91 #include "grit/ui_resources.h" |
93 #include "grit/webkit_resources.h" | 92 #include "grit/webkit_resources.h" |
94 #include "ui/base/accessibility/accessible_view_state.h" | 93 #include "ui/base/accessibility/accessible_view_state.h" |
95 #include "ui/base/l10n/l10n_util.h" | 94 #include "ui/base/l10n/l10n_util.h" |
96 #include "ui/base/resource/resource_bundle.h" | 95 #include "ui/base/resource/resource_bundle.h" |
(...skipping 1626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1723 if (active) { | 1722 if (active) { |
1724 BrowserList::SetLastActive(browser_.get()); | 1723 BrowserList::SetLastActive(browser_.get()); |
1725 browser_->OnWindowActivated(); | 1724 browser_->OnWindowActivated(); |
1726 } | 1725 } |
1727 } | 1726 } |
1728 | 1727 |
1729 void BrowserView::OnWindowBeginUserBoundsChange() { | 1728 void BrowserView::OnWindowBeginUserBoundsChange() { |
1730 TabContents* tab_contents = GetSelectedTabContents(); | 1729 TabContents* tab_contents = GetSelectedTabContents(); |
1731 if (!tab_contents) | 1730 if (!tab_contents) |
1732 return; | 1731 return; |
1733 RenderViewHost* rvh = tab_contents->render_view_host(); | 1732 tab_contents->render_view_host()->NotifyMoveOrResizeStarted(); |
1734 rvh->Send(new ViewMsg_MoveOrResizeStarted(rvh->routing_id())); | |
1735 } | 1733 } |
1736 | 1734 |
1737 void BrowserView::OnWidgetMove() { | 1735 void BrowserView::OnWidgetMove() { |
1738 if (!initialized_) { | 1736 if (!initialized_) { |
1739 // Creating the widget can trigger a move. Ignore it until we've initialized | 1737 // Creating the widget can trigger a move. Ignore it until we've initialized |
1740 // things. | 1738 // things. |
1741 return; | 1739 return; |
1742 } | 1740 } |
1743 | 1741 |
1744 // Cancel any tabstrip animations, some of them may be invalidated by the | 1742 // Cancel any tabstrip animations, some of them may be invalidated by the |
(...skipping 963 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2708 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { | 2706 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { |
2709 // Create the view and the frame. The frame will attach itself via the view | 2707 // Create the view and the frame. The frame will attach itself via the view |
2710 // so we don't need to do anything with the pointer. | 2708 // so we don't need to do anything with the pointer. |
2711 BrowserView* view = new BrowserView(browser); | 2709 BrowserView* view = new BrowserView(browser); |
2712 (new BrowserFrame(view))->InitBrowserFrame(); | 2710 (new BrowserFrame(view))->InitBrowserFrame(); |
2713 view->GetWidget()->non_client_view()->SetAccessibleName( | 2711 view->GetWidget()->non_client_view()->SetAccessibleName( |
2714 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); | 2712 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); |
2715 return view; | 2713 return view; |
2716 } | 2714 } |
2717 #endif | 2715 #endif |
OLD | NEW |