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

Unified Diff: chrome/browser/browser.cc

Issue 160084: Chaos geolocation demo, non-WebKit part. Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/browser.h ('k') | chrome/browser/browser_window.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser.cc
===================================================================
--- chrome/browser/browser.cc (revision 23543)
+++ chrome/browser/browser.cc (working copy)
@@ -36,6 +36,7 @@
#include "chrome/browser/sessions/session_types.h"
#include "chrome/browser/sessions/tab_restore_service.h"
#include "chrome/browser/status_bubble.h"
+#include "chrome/browser/tab_contents/geoloc_infobar_delegate.h"
#include "chrome/browser/tab_contents/interstitial_page.h"
#include "chrome/browser/tab_contents/navigation_controller.h"
#include "chrome/browser/tab_contents/navigation_entry.h"
@@ -906,6 +907,7 @@
}
void Browser::BookmarkCurrentPage() {
+ /*
UserMetrics::RecordAction(L"Star", profile_);
TabContents* contents = GetSelectedTabContents();
@@ -927,6 +929,9 @@
// weird situations were the bubble is deleted as soon as it is shown.
window_->ShowBookmarkBubble(url, was_bookmarked);
}
+ */
+ TabContents* tab = GetSelectedTabContents();
+ tab->AddInfoBar(new GeolocInfoBarDelegate(tab));
}
void Browser::SavePage() {
@@ -1222,6 +1227,11 @@
}
#endif
+void Browser::OpenApiPermissionsPanel() {
+ UserMetrics::RecordAction(L"ApiPermissions", profile_);
+ window_->ShowApiPermissionsPanel();
+}
+
///////////////////////////////////////////////////////////////////////////////
// static
@@ -1437,6 +1447,7 @@
#if defined(OS_CHROMEOS)
case IDC_CONTROL_PANEL: ShowControlPanel(); break;
#endif
+ case IDC_API_PERMISSIONS_PANEL: OpenApiPermissionsPanel(); break;
default:
LOG(WARNING) << "Received Unimplemented Command: " << id;
@@ -2217,6 +2228,7 @@
#if defined(OS_CHROMEOS)
command_updater_.UpdateCommandEnabled(IDC_CONTROL_PANEL, true);
#endif
+ command_updater_.UpdateCommandEnabled(IDC_API_PERMISSIONS_PANEL, true);
// Initialize other commands based on the window type.
{
« no previous file with comments | « chrome/browser/browser.h ('k') | chrome/browser/browser_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698