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 934 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
945 return browser_->SupportsWindowFeature(Browser::FEATURE_TOOLBAR) || | 945 return browser_->SupportsWindowFeature(Browser::FEATURE_TOOLBAR) || |
946 browser_->SupportsWindowFeature(Browser::FEATURE_LOCATIONBAR); | 946 browser_->SupportsWindowFeature(Browser::FEATURE_LOCATIONBAR); |
947 } | 947 } |
948 | 948 |
949 void BrowserView::DisableInactiveFrame() { | 949 void BrowserView::DisableInactiveFrame() { |
950 #if defined(OS_WIN) && !defined(USE_AURA) | 950 #if defined(OS_WIN) && !defined(USE_AURA) |
951 frame_->DisableInactiveRendering(); | 951 frame_->DisableInactiveRendering(); |
952 #endif // No tricks are needed to get the right behavior on Linux. | 952 #endif // No tricks are needed to get the right behavior on Linux. |
953 } | 953 } |
954 | 954 |
955 void BrowserView::ConfirmSetDefaultSearchProvider( | 955 void BrowserView::ConfirmSetDefaultSearchProvider(TabContents* tab_contents, |
956 TabContents* tab_contents, | 956 TemplateURL* template_url, |
957 TemplateURL* template_url, | 957 Profile* profile) { |
958 TemplateURLService* template_url_service) { | |
959 #if defined(OS_WIN) && !defined(USE_AURA) | 958 #if defined(OS_WIN) && !defined(USE_AURA) |
960 DefaultSearchView::Show(tab_contents, template_url, template_url_service); | 959 DefaultSearchView::Show(tab_contents, template_url, profile); |
961 #else | 960 #else |
962 // TODO(levin): Implement for other platforms. Right now this is behind | 961 // TODO(levin): Implement for other platforms. Right now this is behind |
963 // a command line flag which is off. http://crbug.com/38475 | 962 // a command line flag which is off. http://crbug.com/38475 |
964 #endif | 963 #endif |
965 } | 964 } |
966 | 965 |
967 void BrowserView::ConfirmAddSearchProvider(const TemplateURL* template_url, | 966 void BrowserView::ConfirmAddSearchProvider(const TemplateURL* template_url, |
968 Profile* profile) { | 967 Profile* profile) { |
969 browser::EditSearchEngine(GetWidget()->GetNativeWindow(), template_url, NULL, | 968 browser::EditSearchEngine(GetWidget()->GetNativeWindow(), template_url, NULL, |
970 profile); | 969 profile); |
(...skipping 1586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2557 views::View::ConvertPointToScreen(GetTabContentsContainerView(), &origin); | 2556 views::View::ConvertPointToScreen(GetTabContentsContainerView(), &origin); |
2558 gfx::Rect bounds; | 2557 gfx::Rect bounds; |
2559 bounds.set_origin(origin); | 2558 bounds.set_origin(origin); |
2560 | 2559 |
2561 AvatarMenuBubbleView* bubble_view = new AvatarMenuBubbleView(browser_.get()); | 2560 AvatarMenuBubbleView* bubble_view = new AvatarMenuBubbleView(browser_.get()); |
2562 // Bubble::Show() takes ownership of the view. | 2561 // Bubble::Show() takes ownership of the view. |
2563 Bubble::Show(this->GetWidget(), bounds, | 2562 Bubble::Show(this->GetWidget(), bounds, |
2564 views::BubbleBorder::TOP_RIGHT, | 2563 views::BubbleBorder::TOP_RIGHT, |
2565 bubble_view, bubble_view); | 2564 bubble_view, bubble_view); |
2566 } | 2565 } |
OLD | NEW |