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

Side by Side Diff: chrome/browser/extensions/api/tabs/ash_panel_contents.cc

Issue 480883002: Move session_id.{cc,h} from chrome/browser/sessions to components/sessions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
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 "chrome/browser/extensions/api/tabs/ash_panel_contents.h" 5 #include "chrome/browser/extensions/api/tabs/ash_panel_contents.h"
6 6
7 #include "apps/ui/native_app_window.h" 7 #include "apps/ui/native_app_window.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chrome/browser/chrome_notification_types.h" 9 #include "chrome/browser/chrome_notification_types.h"
10 #include "chrome/browser/extensions/api/tabs/tabs_constants.h" 10 #include "chrome/browser/extensions/api/tabs/tabs_constants.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 if ((extension && !IsVisibleToExtension(extension)) || 95 if ((extension && !IsVisibleToExtension(extension)) ||
96 (tab_index > 0)) { 96 (tab_index > 0)) {
97 return NULL; 97 return NULL;
98 } 98 }
99 content::WebContents* web_contents = app_window_->web_contents(); 99 content::WebContents* web_contents = app_window_->web_contents();
100 if (!web_contents) 100 if (!web_contents)
101 return NULL; 101 return NULL;
102 102
103 base::DictionaryValue* tab_value = new base::DictionaryValue(); 103 base::DictionaryValue* tab_value = new base::DictionaryValue();
104 tab_value->SetInteger(extensions::tabs_constants::kIdKey, 104 tab_value->SetInteger(extensions::tabs_constants::kIdKey,
105 SessionID::IdForTab(web_contents)); 105 SessionTabHelper::IdForTab(web_contents));
106 tab_value->SetInteger(extensions::tabs_constants::kIndexKey, 0); 106 tab_value->SetInteger(extensions::tabs_constants::kIndexKey, 0);
107 const int window_id = GetWindowId(); 107 const int window_id = GetWindowId();
108 tab_value->SetInteger(extensions::tabs_constants::kWindowIdKey, window_id); 108 tab_value->SetInteger(extensions::tabs_constants::kWindowIdKey, window_id);
109 tab_value->SetString( 109 tab_value->SetString(
110 extensions::tabs_constants::kUrlKey, web_contents->GetURL().spec()); 110 extensions::tabs_constants::kUrlKey, web_contents->GetURL().spec());
111 tab_value->SetString( 111 tab_value->SetString(
112 extensions::tabs_constants::kStatusKey, 112 extensions::tabs_constants::kStatusKey,
113 extensions::ExtensionTabUtil::GetTabStatusText( 113 extensions::ExtensionTabUtil::GetTabStatusText(
114 web_contents->IsLoading())); 114 web_contents->IsLoading()));
115 tab_value->SetBoolean(extensions::tabs_constants::kActiveKey, 115 tab_value->SetBoolean(extensions::tabs_constants::kActiveKey,
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 238
239 content::WebContents* AshPanelContents::GetAssociatedWebContents() const { 239 content::WebContents* AshPanelContents::GetAssociatedWebContents() const {
240 return web_contents_.get(); 240 return web_contents_.get();
241 } 241 }
242 242
243 void AshPanelContents::OnRequest( 243 void AshPanelContents::OnRequest(
244 const ExtensionHostMsg_Request_Params& params) { 244 const ExtensionHostMsg_Request_Params& params) {
245 extension_function_dispatcher_->Dispatch( 245 extension_function_dispatcher_->Dispatch(
246 params, web_contents_->GetRenderViewHost()); 246 params, web_contents_->GetRenderViewHost());
247 } 247 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/tab_capture/tab_capture_registry.cc ('k') | chrome/browser/extensions/api/tabs/tabs_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698