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

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 1286063002: Add a path for content/ to open and control a Bluetooth chooser dialog. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: Clean up. Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/browser/frame_host/render_frame_host_impl.h" 5 #include "content/browser/frame_host/render_frame_host_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/containers/hash_tables.h" 9 #include "base/containers/hash_tables.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 1916 matching lines...) Expand 10 before | Expand all | Expand 10 after
1927 1927
1928 const image_downloader::ImageDownloaderPtr& 1928 const image_downloader::ImageDownloaderPtr&
1929 RenderFrameHostImpl::GetMojoImageDownloader() { 1929 RenderFrameHostImpl::GetMojoImageDownloader() {
1930 if (!mojo_image_downloader_.get() && GetServiceRegistry()) { 1930 if (!mojo_image_downloader_.get() && GetServiceRegistry()) {
1931 GetServiceRegistry()->ConnectToRemoteService( 1931 GetServiceRegistry()->ConnectToRemoteService(
1932 mojo::GetProxy(&mojo_image_downloader_)); 1932 mojo::GetProxy(&mojo_image_downloader_));
1933 } 1933 }
1934 return mojo_image_downloader_; 1934 return mojo_image_downloader_;
1935 } 1935 }
1936 1936
1937 scoped_ptr<BluetoothChooser> RenderFrameHostImpl::RunBluetoothChooser(
1938 BluetoothChooser::Observer* observer,
1939 int chooser_id,
1940 const GURL& origin) {
1941 if (delegate_) {
ortuno 2015/08/17 21:12:59 Why do you have to check if the delegate is there?
Jeffrey Yasskin 2015/08/17 23:38:16 Looking at other uses of delegate_, I don't. Thank
1942 return delegate_->RunBluetoothChooser(observer, chooser_id, origin);
1943 }
1944 return nullptr;
1945 }
1946
1937 bool RenderFrameHostImpl::IsSameSiteInstance( 1947 bool RenderFrameHostImpl::IsSameSiteInstance(
1938 RenderFrameHostImpl* other_render_frame_host) { 1948 RenderFrameHostImpl* other_render_frame_host) {
1939 // As a sanity check, make sure the frame belongs to the same BrowserContext. 1949 // As a sanity check, make sure the frame belongs to the same BrowserContext.
1940 CHECK_EQ(GetSiteInstance()->GetBrowserContext(), 1950 CHECK_EQ(GetSiteInstance()->GetBrowserContext(),
1941 other_render_frame_host->GetSiteInstance()->GetBrowserContext()); 1951 other_render_frame_host->GetSiteInstance()->GetBrowserContext());
1942 return GetSiteInstance() == other_render_frame_host->GetSiteInstance(); 1952 return GetSiteInstance() == other_render_frame_host->GetSiteInstance();
1943 } 1953 }
1944 1954
1945 void RenderFrameHostImpl::SetAccessibilityMode(AccessibilityMode mode) { 1955 void RenderFrameHostImpl::SetAccessibilityMode(AccessibilityMode mode) {
1946 Send(new FrameMsg_SetAccessibilityMode(routing_id_, mode)); 1956 Send(new FrameMsg_SetAccessibilityMode(routing_id_, mode));
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
2215 BrowserPluginInstanceIDToAXTreeID(value))); 2225 BrowserPluginInstanceIDToAXTreeID(value)));
2216 break; 2226 break;
2217 case AX_CONTENT_INT_ATTRIBUTE_LAST: 2227 case AX_CONTENT_INT_ATTRIBUTE_LAST:
2218 NOTREACHED(); 2228 NOTREACHED();
2219 break; 2229 break;
2220 } 2230 }
2221 } 2231 }
2222 } 2232 }
2223 2233
2224 } // namespace content 2234 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698