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

Side by Side Diff: chrome/browser/views/frame/browser_view.cc

Issue 2225003: Implement upgrade notifications.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 7 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/views/frame/browser_view.h" 5 #include "chrome/browser/views/frame/browser_view.h"
6 6
7 #if defined(OS_LINUX) 7 #if defined(OS_LINUX)
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #endif 9 #endif
10 10
(...skipping 24 matching lines...) Expand all
35 #include "chrome/browser/views/extensions/extension_shelf.h" 35 #include "chrome/browser/views/extensions/extension_shelf.h"
36 #include "chrome/browser/views/frame/browser_extender.h" 36 #include "chrome/browser/views/frame/browser_extender.h"
37 #include "chrome/browser/views/frame/browser_view_layout.h" 37 #include "chrome/browser/views/frame/browser_view_layout.h"
38 #include "chrome/browser/views/fullscreen_exit_bubble.h" 38 #include "chrome/browser/views/fullscreen_exit_bubble.h"
39 #include "chrome/browser/views/status_bubble_views.h" 39 #include "chrome/browser/views/status_bubble_views.h"
40 #include "chrome/browser/views/tab_contents/tab_contents_container.h" 40 #include "chrome/browser/views/tab_contents/tab_contents_container.h"
41 #include "chrome/browser/views/tabs/browser_tab_strip_controller.h" 41 #include "chrome/browser/views/tabs/browser_tab_strip_controller.h"
42 #include "chrome/browser/views/tabs/side_tab_strip.h" 42 #include "chrome/browser/views/tabs/side_tab_strip.h"
43 #include "chrome/browser/views/theme_install_bubble_view.h" 43 #include "chrome/browser/views/theme_install_bubble_view.h"
44 #include "chrome/browser/views/toolbar_view.h" 44 #include "chrome/browser/views/toolbar_view.h"
45 #include "chrome/browser/views/update_recommended_message_box.h"
45 #include "chrome/browser/window_sizer.h" 46 #include "chrome/browser/window_sizer.h"
46 #include "chrome/common/chrome_switches.h" 47 #include "chrome/common/chrome_switches.h"
47 #include "chrome/common/extensions/extension_resource.h" 48 #include "chrome/common/extensions/extension_resource.h"
48 #include "chrome/common/native_window_notification_source.h" 49 #include "chrome/common/native_window_notification_source.h"
49 #include "chrome/common/notification_service.h" 50 #include "chrome/common/notification_service.h"
50 #include "chrome/common/pref_names.h" 51 #include "chrome/common/pref_names.h"
51 #include "gfx/canvas.h" 52 #include "gfx/canvas.h"
52 #include "grit/app_resources.h" 53 #include "grit/app_resources.h"
53 #include "grit/chromium_strings.h" 54 #include "grit/chromium_strings.h"
54 #include "grit/generated_resources.h" 55 #include "grit/generated_resources.h"
(...skipping 904 matching lines...) Expand 10 before | Expand all | Expand 10 after
959 960
960 void BrowserView::ToggleExtensionShelf() { 961 void BrowserView::ToggleExtensionShelf() {
961 ExtensionShelf::ToggleWhenExtensionShelfVisible(browser_->profile()); 962 ExtensionShelf::ToggleWhenExtensionShelfVisible(browser_->profile());
962 } 963 }
963 964
964 views::Window* BrowserView::ShowAboutChromeDialog() { 965 views::Window* BrowserView::ShowAboutChromeDialog() {
965 return browser::ShowAboutChromeView(GetWindow()->GetNativeWindow(), 966 return browser::ShowAboutChromeView(GetWindow()->GetNativeWindow(),
966 browser_->profile()); 967 browser_->profile());
967 } 968 }
968 969
970 void BrowserView::ShowUpdateChromeDialog() {
971 #if defined(OS_WIN)
972 UpdateRecommendedMessageBox::ShowMessageBox(GetWindow()->GetNativeWindow());
973 #endif
974 }
975
969 void BrowserView::ShowTaskManager() { 976 void BrowserView::ShowTaskManager() {
970 browser::ShowTaskManager(); 977 browser::ShowTaskManager();
971 } 978 }
972 979
973 void BrowserView::ShowBookmarkBubble(const GURL& url, bool already_bookmarked) { 980 void BrowserView::ShowBookmarkBubble(const GURL& url, bool already_bookmarked) {
974 toolbar_->location_bar()->ShowStarBubble(url, !already_bookmarked); 981 toolbar_->location_bar()->ShowStarBubble(url, !already_bookmarked);
975 } 982 }
976 983
977 void BrowserView::SetDownloadShelfVisible(bool visible) { 984 void BrowserView::SetDownloadShelfVisible(bool visible) {
978 // This can be called from the superclass destructor, when it destroys our 985 // This can be called from the superclass destructor, when it destroys our
979 // child views. At that point, browser_ is already gone. 986 // child views. At that point, browser_ is already gone.
980 if (browser_ == NULL) 987 if (browser_ == NULL)
981 return; 988 return;
982 989
983 if (visible && IsDownloadShelfVisible() != visible) 990 if (visible && IsDownloadShelfVisible() != visible) {
984 // Invoke GetDownloadShelf to force the shelf to be created. 991 // Invoke GetDownloadShelf to force the shelf to be created.
985 GetDownloadShelf(); 992 GetDownloadShelf();
993 }
986 994
987 if (browser_ != NULL) 995 if (browser_ != NULL)
988 browser_->UpdateDownloadShelfVisibility(visible); 996 browser_->UpdateDownloadShelfVisibility(visible);
989 997
990 // SetDownloadShelfVisible can force-close the shelf, so make sure we lay out 998 // SetDownloadShelfVisible can force-close the shelf, so make sure we lay out
991 // everything correctly, as if the animation had finished. This doesn't 999 // everything correctly, as if the animation had finished. This doesn't
992 // matter for showing the shelf, as the show animation will do it. 1000 // matter for showing the shelf, as the show animation will do it.
993 SelectedTabToolbarSizeChanged(false); 1001 SelectedTabToolbarSizeChanged(false);
994 } 1002 }
995 1003
(...skipping 1241 matching lines...) Expand 10 before | Expand all | Expand 10 after
2237 SetAccessibleName(l10n_util::GetString(IDS_PRODUCT_NAME)); 2245 SetAccessibleName(l10n_util::GetString(IDS_PRODUCT_NAME));
2238 2246
2239 return view; 2247 return view;
2240 } 2248 }
2241 #endif 2249 #endif
2242 2250
2243 // static 2251 // static
2244 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { 2252 FindBar* BrowserWindow::CreateFindBar(Browser* browser) {
2245 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); 2253 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window()));
2246 } 2254 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698